From 6d4a1be367c52c70febe70479127bfc1330a7676 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 21 Nov 2024 02:24:31 -0600 Subject: add more config file options --- forgeConfig/main.go | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'forgeConfig/main.go') 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") -- cgit v1.2.3