diff options
| -rw-r--r-- | doShow.go | 13 | ||||
| -rw-r--r-- | exit.go | 4 | ||||
| -rw-r--r-- | main.go | 35 |
3 files changed, 18 insertions, 34 deletions
@@ -49,3 +49,16 @@ func doShow() (string, error) { } return footer, nil } + +func showUrls() bool { + if argv.Show == nil { + return false + } + if argv.Show.Repo == nil { + return false + } + if argv.Show.Repo.Urls != nil { + return true + } + return false +} @@ -17,9 +17,7 @@ func forgeShutdown() { gui.UnloadToolkits() resetTerminalTitle() log.Info("exit got to forgeShutdown()") - if configSave { - me.forge.SetConfigSave(configSave) - } + // me.forge.SetConfigSave(configSave) if err := me.forge.Close(); err != nil { log.Info("ABNORMAL END", err) } @@ -7,19 +7,16 @@ package main import ( "embed" - "strings" "go.wit.com/lib/gui/prep" "go.wit.com/lib/protobuf/forgepb" - "go.wit.com/lib/protobuf/gitpb" - "go.wit.com/log" ) -// sent via -ldflags +// sent via -ldflags // is there a better way? var VERSION string var BUILDTIME string -// this optionally can store the GUI plugins +// at build time, this can be used to store GUI plugins with matching GO deps // //go:embed resources/* var resources embed.FS @@ -27,31 +24,6 @@ var resources embed.FS // used for shell auto completion var ARGNAME string = "forge" -// using this for now. triggers config save -var configSave bool - -func getVersion(repo *gitpb.Repo, name string) string { - cmd := []string{"git", "describe", "--tags", "--always", name} - result, _ := repo.RunQuiet(cmd) - output := strings.Join(result.Stdout, "\n") - log.Info("cmd =", cmd, output) - - return strings.TrimSpace(output) -} - -func showUrls() bool { - if argv.Show == nil { - return false - } - if argv.Show.Repo == nil { - return false - } - if argv.Show.Repo.Urls != nil { - return true - } - return false -} - func main() { me = new(mainType) @@ -84,7 +56,6 @@ func main() { } //// start standard argv subcommand processing here //// - var s string var err error if argv.Dev != nil { @@ -147,7 +118,9 @@ func main() { if argv.Patch != nil { s, err = doPatch() } + //// end standard argv subcommand processing here //// + // if the gui starts, it doesn't yet go to the end normally if argv.Gui != nil { me.myGui.Start() // loads the GUI toolkit doGui() // start making our forge GUI |
