From d9a9a9071d16c779a390d94666f736e1e96c48dc Mon Sep 17 00:00:00 2001 From: Maria Date: Tue, 21 May 2024 19:09:28 +0100 Subject: feat: Allow packages to define custom documentation URL and badge (#147) feat: Allow packages to define custom doc URL and badge Co-authored-by: Jacob Oaks Co-authored-by: r-hang --- config.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'config.go') diff --git a/config.go b/config.go index 25b32fd..1c8c069 100644 --- a/config.go +++ b/config.go @@ -53,6 +53,19 @@ type PackageConfig struct { // Desc is a plain text description of this module. Desc string `yaml:"description"` + + // DocURL is the link to this module's documentation. + // + // Defaults to the base doc URL specified in the top-level config + // with the package path appended. + DocURL string `yaml:"doc_url"` + + // DocBadge is the URL of the badge which links to this module's + // documentation. + // + // Defaults to the pkg.go.dev badge URL with this module's path as a + // parameter. + DocBadge string `yaml:"doc_badge"` } // Parse takes a path to a yaml file and produces a parsed Config -- cgit v1.2.3