stub cli
cicd / ci (push) Successful in 1m1s
Details
cicd / ci (push) Successful in 1m1s
Details
parent
23bd6e29c9
commit
e4d60a9e73
|
|
@ -0,0 +1,13 @@
|
||||||
|
package cli
|
||||||
|
|
||||||
|
import (
|
||||||
|
"flag"
|
||||||
|
"os"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Main() {
|
||||||
|
fs := flag.NewFlagSet(os.Args[0], flag.ContinueOnError)
|
||||||
|
if err := fs.Parse(os.Args[1:]); err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -3,6 +3,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"gogs.inhome.blapointe.com/ana-ledger/cmd/cli"
|
||||||
"gogs.inhome.blapointe.com/ana-ledger/cmd/http"
|
"gogs.inhome.blapointe.com/ana-ledger/cmd/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -11,5 +12,8 @@ func main() {
|
||||||
case "http":
|
case "http":
|
||||||
os.Args = append([]string{os.Args[0]}, os.Args[2:]...)
|
os.Args = append([]string{os.Args[0]}, os.Args[2:]...)
|
||||||
http.Main()
|
http.Main()
|
||||||
|
case "cli":
|
||||||
|
os.Args = append([]string{os.Args[0]}, os.Args[2:]...)
|
||||||
|
cli.Main()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue