vcs as string, not int.

No longer do we keep track of const iota style. Just encode the behavior
in the server for defaults, add a validation function, call it a day.

Change-Id: I603e9dd287a57084c78c543f1ce83b0acf47a765
This commit is contained in:
sm
2016-03-01 23:49:24 -08:00
parent a1f6e15f28
commit ce00d933aa
7 changed files with 151 additions and 83 deletions
+2 -2
View File
@@ -65,7 +65,7 @@ func main() {
c := &config{
Port: 4040,
}
if err := envconfig.Process("ysv", c); err != nil {
if err := envconfig.Process("vain", c); err != nil {
fmt.Fprintf(os.Stderr, "problem processing environment: %v", err)
os.Exit(1)
}
@@ -77,7 +77,7 @@ func main() {
}
}
if c.DB == "" {
log.Printf("warning: in-memory db mode; if you do not want this set YSV_DB")
log.Printf("warning: in-memory db mode; if you do not want this set VAIN_DB")
}
hostname := "localhost"
if hn, err := os.Hostname(); err != nil {