aboutsummaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--config.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/config.go b/config.go
index 439bc48..25b32fd 100644
--- a/config.go
+++ b/config.go
@@ -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
}