@@ -9,7 +9,7 @@ package main
99////////////////////////////////////////////////////////////////////////////
1010// Program: redo
1111// Purpose: global option redo
12- // Authors: Myself <me@mine.org> (c) 2022-2023 , All rights reserved
12+ // Authors: Myself <me@mine.org> (c) 2022-2025 , All rights reserved
1313////////////////////////////////////////////////////////////////////////////
1414
1515import (
@@ -21,6 +21,9 @@ import (
2121
2222// Template for main starts here
2323
24+ // // for `go generate -x`
25+ // //go:generate sh redo_cliGen.sh
26+
2427//////////////////////////////////////////////////////////////////////////
2528// Constant and data type/structure definitions
2629
@@ -30,23 +33,23 @@ import (
3033// var (
3134// progname = "redo"
3235// version = "0.1.0"
33- // date = "2023-01-23 "
36+ // date = "2025-04-13 "
3437
35- // // opts store all the configurable options
36- // opts optsT
38+ // // Opts store all the configurable options
39+ // Opts OptsT
3740// )
3841//
39- // var gfParser = flags.NewParser(&opts , flags.Default)
42+ // var gfParser = flags.NewParser(&Opts , flags.Default)
4043
4144////////////////////////////////////////////////////////////////////////////
4245// Function definitions
4346
4447//==========================================================================
4548// Function main
4649// func main() {
47- // opts .Version = showVersion
48- // opts .Verbflg = func() {
49- // opts .Verbose++
50+ // Opts .Version = showVersion
51+ // Opts .Verbflg = func() {
52+ // Opts .Verbose++
5053// }
5154//
5255// if _, err := gfParser.Parse(); err != nil {
@@ -64,7 +67,7 @@ import (
6467// func showVersion() {
6568// fmt.Fprintf(os.Stderr, "redo - global option redo, version %s\n", version)
6669// fmt.Fprintf(os.Stderr, "Built on %s\n", date)
67- // fmt.Fprintf(os.Stderr, "Copyright (C) 2022-2023 , Myself <me@mine.org>\n\n")
70+ // fmt.Fprintf(os.Stderr, "Copyright (C) 2022-2025 , Myself <me@mine.org>\n\n")
6871// fmt.Fprintf(os.Stderr, "Redo global option via automatic code-gen\n")
6972// os.Exit(0)
7073// }
@@ -77,8 +80,8 @@ import (
7780
7881// Template for type define starts here
7982
80- // The optsT type defines all the configurable options from cli.
81- type optsT struct {
83+ // The OptsT type defines all the configurable options from cli.
84+ type OptsT struct {
8285 Host string `short:"H" long:"host" env:"REDO_HOST" description:"Host address" default:"localhost"`
8386 Port int `short:"p" long:"port" env:"REDO_PORT" description:"Listening port" default:"80"`
8487 Force bool `short:"f" long:"force" env:"REDO_FORCE" description:"Force start"`
@@ -93,7 +96,7 @@ type optsT struct {
9396////////////////////////////////////////////////////////////////////////////
9497// Program: redo
9598// Purpose: global option redo
96- // Authors: Myself <me@mine.org> (c) 2022-2023 , All rights reserved
99+ // Authors: Myself <me@mine.org> (c) 2022-2025 , All rights reserved
97100////////////////////////////////////////////////////////////////////////////
98101
99102// package main
@@ -130,9 +133,9 @@ type optsT struct {
130133//
131134// func (x *BuildCommand) Execute(args []string) error {
132135// fmt.Fprintf(os.Stderr, "Build the network application\n")
133- // // fmt.Fprintf(os.Stderr, "Copyright (C) 2022-2023 , Myself <me@mine.org>\n\n")
134- // clis.Setup("redo::build", opts .Verbose)
135- // clis.Verbose(1, "Doing Build, with %+v, %+v", opts , args)
136+ // // fmt.Fprintf(os.Stderr, "Copyright (C) 2022-2025 , Myself <me@mine.org>\n\n")
137+ // clis.Setup("redo::build", Opts .Verbose)
138+ // clis.Verbose(1, "Doing Build, with %+v, %+v", Opts , args)
136139// // fmt.Println(x.Dir)
137140// return x.Exec(args)
138141// }
@@ -151,7 +154,7 @@ type optsT struct {
151154////////////////////////////////////////////////////////////////////////////
152155// Program: redo
153156// Purpose: global option redo
154- // Authors: Myself <me@mine.org> (c) 2022-2023 , All rights reserved
157+ // Authors: Myself <me@mine.org> (c) 2022-2025 , All rights reserved
155158////////////////////////////////////////////////////////////////////////////
156159
157160// package main
@@ -189,9 +192,9 @@ type optsT struct {
189192//
190193// func (x *InstallCommand) Execute(args []string) error {
191194// fmt.Fprintf(os.Stderr, "Install the network application\n")
192- // // fmt.Fprintf(os.Stderr, "Copyright (C) 2022-2023 , Myself <me@mine.org>\n\n")
193- // clis.Setup("redo::install", opts .Verbose)
194- // clis.Verbose(1, "Doing Install, with %+v, %+v", opts , args)
195+ // // fmt.Fprintf(os.Stderr, "Copyright (C) 2022-2025 , Myself <me@mine.org>\n\n")
196+ // clis.Setup("redo::install", Opts .Verbose)
197+ // clis.Verbose(1, "Doing Install, with %+v, %+v", Opts , args)
195198// // fmt.Println(x.Dir, x.Suffix)
196199// return x.Exec(args)
197200// }
@@ -210,7 +213,7 @@ type optsT struct {
210213////////////////////////////////////////////////////////////////////////////
211214// Program: redo
212215// Purpose: global option redo
213- // Authors: Myself <me@mine.org> (c) 2022-2023 , All rights reserved
216+ // Authors: Myself <me@mine.org> (c) 2022-2025 , All rights reserved
214217////////////////////////////////////////////////////////////////////////////
215218
216219// package main
@@ -256,9 +259,9 @@ type optsT struct {
256259//
257260// func (x *PublishCommand) Execute(args []string) error {
258261// fmt.Fprintf(os.Stderr, "Publish the network application\n")
259- // // fmt.Fprintf(os.Stderr, "Copyright (C) 2022-2023 , Myself <me@mine.org>\n\n")
260- // clis.Setup("redo::publish", opts .Verbose)
261- // clis.Verbose(1, "Doing Publish, with %+v, %+v", opts , args)
262+ // // fmt.Fprintf(os.Stderr, "Copyright (C) 2022-2025 , Myself <me@mine.org>\n\n")
263+ // clis.Setup("redo::publish", Opts .Verbose)
264+ // clis.Verbose(1, "Doing Publish, with %+v, %+v", Opts , args)
262265// // fmt.Println(x.Dir, x.Suffix, x.Out, x.Args)
263266// return x.Exec(args)
264267// }
0 commit comments