From 0c2423043d2ba9979dca951a61473925edd2def6 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 12 Oct 2025 01:07:00 -0500 Subject: Exit() callback works --- main.go | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index a180acb..8fd3602 100644 --- a/main.go +++ b/main.go @@ -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 -- cgit v1.2.3