diff options
Diffstat (limited to 'config.go')
| -rw-r--r-- | config.go | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -46,6 +46,11 @@ type PackageConfig struct { // Defaults to the URL specified in the top-level config. URL string `yaml:"url"` + // VCS is the version control system of this module. + // + // Defaults to git. + VCS string `yaml:"vcs"` + // Desc is a plain text description of this module. Desc string `yaml:"description"` } @@ -73,5 +78,14 @@ func Parse(path string) (*Config, error) { c.Godoc.Host = host } + // Set default values for the packages. + for name, pkg := range c.Packages { + if pkg.VCS == "" { + pkg.VCS = "git" + } + + c.Packages[name] = pkg + } + return &c, err } |