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
+10 -1
View File
@@ -107,5 +107,14 @@ func (ms *SimpleStore) Load() error {
return err
}
defer f.Close()
return json.NewDecoder(f).Decode(&ms.p)
in := map[string]Package{}
if err := json.NewDecoder(f).Decode(&in); err != nil {
return err
}
for k, v := range in {
v.path = k
ms.p[k] = v
}
return nil
}