diff options
| author | Jeff Carr <[email protected]> | 2025-08-28 12:38:42 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-08-28 19:30:59 -0500 |
| commit | 6b6b31eef6f6a636db0750fcd0d59e3e0758013e (patch) | |
| tree | 86eef1ff8c9fcc2f3842688d7c0e02402421d64f /main.go | |
| parent | 81885f44834b0f3a20999d8031ed0fc3bf6a0fa5 (diff) | |
stub in code to start the process of processing patches
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 24 |
1 files changed, 22 insertions, 2 deletions
@@ -7,26 +7,41 @@ import ( "os" "time" + "go.wit.com/dev/alexflint/arg" + "go.wit.com/gui" "go.wit.com/log" ) // are sent via -ldflags at buildtime var VERSION string var BUILDTIME string +var ARGNAME string = "forged" //go:embed resources/* var resources embed.FS -// var forge *forgepb.Forge - var HOSTNAME string = "forge.wit.com" var LIBDIR string = "/var/lib/forged/" var FORGEDIR string = "/home/forge" func main() { + me = new(mainType) + gui.InitArg() + me.pp = arg.MustParse(&argv) + + if argv.Bash { + argv.doBash() + os.Exit(0) + } + if len(argv.BashAuto) != 0 { + argv.doBashAuto() + os.Exit(0) + } + if argv.Hostname != "" { HOSTNAME = argv.Hostname } + // the default forged dir is /home/forge if os.Getenv("FORGE_GOSRC") == "" { os.Setenv("FORGE_GOSRC", "/home/forge") @@ -37,6 +52,11 @@ func main() { okExit("") } + if argv.Pull != nil { + log.Info("pull here") + okExit("") + } + http.HandleFunc("/", okHandler) // go https() // use caddy instead p := fmt.Sprintf(":%d", argv.Port) |
