feat: reastructure and create commands
Some checks failed
Go / build (push) Has been cancelled

This commit is contained in:
2025-09-16 21:11:14 +02:00
parent 8180b38225
commit 6f069ad97b
14 changed files with 387 additions and 5 deletions

37
cmd/invoicer/main.go Normal file
View File

@@ -0,0 +1,37 @@
package main
import (
"flag"
"log"
"os"
"github.com/itzg/go-flagsfiller"
)
func main() {
if len(os.Args) < 2 {
return
}
var cmd *cmd
for n, c := range commands {
if os.Args[1] == n {
cmd = &c
break
}
}
if cmd == nil {
return
}
if cmd.config != nil {
filler := flagsfiller.New()
err := filler.Fill(flag.CommandLine, cmd.config)
if err != nil {
log.Fatal(err)
}
}
cmd.Run()
}