diff options
Diffstat (limited to 'forgeConfig/main.go')
| -rw-r--r-- | forgeConfig/main.go | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/forgeConfig/main.go b/forgeConfig/main.go index 237698c..cd07016 100644 --- a/forgeConfig/main.go +++ b/forgeConfig/main.go @@ -52,12 +52,16 @@ func main() { // try to add, then save config and exit if argv.Add { log.Info("going to add a new repo", argv.GoPath) - new1 := new(forgepb.Repo) - new1.GoPath = argv.GoPath - new1.Writable = argv.Writable - new1.ReadOnly = argv.ReadOnly - new1.Directory = argv.Directory - if repos.Append(new1) { + new1 := forgepb.Repo{ + GoPath: argv.GoPath, + Writable: argv.Writable, + ReadOnly: argv.ReadOnly, + Directory: argv.Directory, + Favorite: argv.Favorite, + Interesting: argv.Interesting, + } + + if repos.Append(&new1) { log.Info("added", new1.GoPath, "ok") } else { log.Info("added", new1.GoPath, "failed") |
