diff options
author | 2023-05-09 11:29:37 -0700 | |
---|---|---|
committer | 2023-05-09 11:29:37 -0700 | |
commit | 2ef9d6a10e40c34a186cc6f1a081e9210169656b (patch) | |
tree | e504345a626ebc5bfc3e08854907d7382fd1cd19 /config.go | |
parent | eda20020c3391cf0a9aed04af1c349afbac66f90 (diff) | |
download | sally-2ef9d6a10e40c34a186cc6f1a081e9210169656b.tar.gz sally-2ef9d6a10e40c34a186cc6f1a081e9210169656b.tar.zst sally-2ef9d6a10e40c34a186cc6f1a081e9210169656b.zip |
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
Diffstat (limited to 'config.go')
-rw-r--r-- | config.go | 17 |
1 files changed, 0 insertions, 17 deletions
@@ -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 } |