summaryrefslogtreecommitdiff
path: root/argv.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-19 05:24:23 -0500
committerJeff Carr <[email protected]>2025-10-19 05:24:23 -0500
commit4a544d613c256bcd3b865e98fb5abbcbf8c15672 (patch)
tree190868b5ea215e16b729b6d140ac8c68d186c1df /argv.go
parent11995fd3b1902125db16fb4bce7ab9561d75ad7b (diff)
newer but still not right argvv0.0.64
Diffstat (limited to 'argv.go')
-rw-r--r--argv.go74
1 files changed, 0 insertions, 74 deletions
diff --git a/argv.go b/argv.go
deleted file mode 100644
index 9cfcd5d..0000000
--- a/argv.go
+++ /dev/null
@@ -1,74 +0,0 @@
-package main
-
-/*
- this parses the command line arguements
- this enables command line options from other packages like 'gui' and 'log'
-*/
-
-import (
- "os"
-
- "go.wit.com/lib/protobuf/argvpb"
-)
-
-var argv args
-
-type args struct {
- Repos *ReposCmd `arg:"subcommand:repos" help:"the forged repos"`
- Patch *PatchCmd `arg:"subcommand:patches" help:"the forged patches"`
- Gui *EmptyCmd `arg:"subcommand:gui" help:"show gui"`
- Missing *EmptyCmd `arg:"subcommand:missing" help:"list missing repos"`
- Port int `arg:"--port" default:"2520" help:"port to run on"`
- Hostname string `arg:"--hostname" help:"hostname to use"`
- Daemon bool `arg:"--daemon" help:"run as a daemon"`
- Force bool `arg:"--force" help:"try to strong arm things"`
- Verbose bool `arg:"--verbose" help:"show more output"`
-}
-
-type EmptyCmd struct {
-}
-
-type PatchCmd struct {
- List *EmptyCmd `arg:"subcommand:list" help:"list the patches"`
- Clean *EmptyCmd `arg:"subcommand:clean" help:"clean the patches"`
- Init *EmptyCmd `arg:"subcommand:init" help:"init"`
-}
-
-type ReposCmd struct {
- List *EmptyCmd `arg:"subcommand:list" help:"list the repos"`
- Pull *EmptyCmd `arg:"subcommand:pull" help:"'git pull' on the repos"`
- Scan *EmptyCmd `arg:"subcommand:scan" help:"scan the forged repo dir"`
- Fix *EmptyCmd `arg:"subcommand:fix" help:"try to fix the repo PB"`
- Devel *EmptyCmd `arg:"subcommand:devel" help:"list repos with devel branches"`
- Reload *EmptyCmd `arg:"subcommand:reload" help:"gitpb.Reload() each repo"`
- // Reload *EmptyCmd `arg:"subcommand:reload" help:"do Reload() on each git repo"`
- // Clean *EmptyCmd `arg:"subcommand:clean" help:"clean the repos"`
- // Merge *EmptyCmd `arg:"subcommand:merge" help:"merge in new patchsets"`
-}
-
-func (args) Appname() string {
- return ARGNAME
-}
-
-func (args) Buildtime() (string, string) {
- return BUILDTIME, VERSION
-}
-
-/*
- handles shell autocomplete
-*/
-
-func (args) Version() string {
- return argvpb.StandardVersion(ARGNAME, VERSION, BUILDTIME)
-}
-
-// sends the strings to bash or zsh that will be your options
-func (a args) SendCompletionStrings(pb *argvpb.Argv) {
- if pb.Cmd == "" {
- base := []string{"--bash", "repos", "gui", "patches", "--daemon", "missing"}
- pb.SendStrings(base)
- } else {
- pb.SubCommand(pb.Goargs...)
- }
- os.Exit(0)
-}