diff options
Diffstat (limited to 'flags.go')
| -rw-r--r-- | flags.go | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -11,13 +11,18 @@ func Get(flag string) string { return found.Value } -func GetError(flag string) error { - return nil -} - -func Set(flag string) { -} +func Set(key string, newValue string) error { + if configPB == nil { + return NotInitialized + } + found := configPB.FindByKey(key) + if found != nil { + found.Value = newValue + } -func SetError(flag string) error { + newvar := new(Config) + newvar.Key = key + newvar.Value = newValue + configPB.Append(newvar) return nil } |
