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:
+10
-1
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user