From 2ef9d6a10e40c34a186cc6f1a081e9210169656b Mon Sep 17 00:00:00 2001 From: Sung Yoon Whang Date: Tue, 9 May 2023 11:29:37 -0700 Subject: Remove branch from PackageConfig struct (#93) * Remove branch from PackageConfig struct With #92, branch is no longer necessary from PackageConfig struct since go-source tag was removed. This removes Branch field from PackageConfig. * update README --- config.go | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'config.go') diff --git a/config.go b/config.go index 4d60a36..439bc48 100644 --- a/config.go +++ b/config.go @@ -9,7 +9,6 @@ import ( const ( _defaultGodocServer = "pkg.go.dev" - _defaultBranch = "master" ) // Config defines the configuration for a Sally server. @@ -42,14 +41,6 @@ type PackageConfig struct { // For example, "github.com/uber-go/sally". Repo string `yaml:"repo"` // required - // Branch is the default branch for the repository - // when no version is specified. - // - // Defaults to master. - Branch string `yaml:"branch"` - // NB: This is no longer necessary. - // https://github.com/uber-go/sally/issues/83 - // URL is the base URL of the vanity import for this module. // // Defaults to the URL specified in the top-level config. @@ -82,13 +73,5 @@ func Parse(path string) (*Config, error) { c.Godoc.Host = host } - // set default branch - for v, p := range c.Packages { - if p.Branch == "" { - p.Branch = _defaultBranch - c.Packages[v] = p - } - } - return &c, err } -- cgit v1.2.3