Fix flag collision with logger
This commit is contained in:
2
go.mod
2
go.mod
@@ -3,7 +3,7 @@ module cook
|
||||
go 1.24.2
|
||||
|
||||
require (
|
||||
git.site.quack-lab.dev/dave/cylogger v1.1.1
|
||||
git.site.quack-lab.dev/dave/cylogger v1.2.2
|
||||
github.com/bmatcuk/doublestar/v4 v4.8.1
|
||||
github.com/stretchr/testify v1.10.0
|
||||
github.com/yuin/gopher-lua v1.1.1
|
||||
|
4
go.sum
4
go.sum
@@ -1,7 +1,7 @@
|
||||
dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
|
||||
dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
|
||||
git.site.quack-lab.dev/dave/cylogger v1.1.1 h1:LQZaigVKUo07hGbS/ZTKiR+l7j4Z2eNf13zsljednNU=
|
||||
git.site.quack-lab.dev/dave/cylogger v1.1.1/go.mod h1:VS9MI4Y/cwjCBZgel7dSfCQlwtAgHmfvixOoBgBhtKg=
|
||||
git.site.quack-lab.dev/dave/cylogger v1.2.2 h1:4xUXASEBlG9NiGxh7f57xHh9imW4unHzakIEpQoKC5E=
|
||||
git.site.quack-lab.dev/dave/cylogger v1.2.2/go.mod h1:VS9MI4Y/cwjCBZgel7dSfCQlwtAgHmfvixOoBgBhtKg=
|
||||
github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=
|
||||
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
|
||||
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
|
||||
|
5
main.go
5
main.go
@@ -57,9 +57,8 @@ func main() {
|
||||
flag.Parse()
|
||||
args := flag.Args()
|
||||
|
||||
level := logger.ParseLevel(*utils.LogLevel)
|
||||
logger.Init(level)
|
||||
logger.Info("Initializing with log level: %s", level.String())
|
||||
logger.InitFlag()
|
||||
logger.Info("Initializing with log level: %s", logger.GetLevel().String())
|
||||
|
||||
// The plan is:
|
||||
// Load all commands
|
||||
|
@@ -9,7 +9,6 @@ var (
|
||||
GitFlag = flag.Bool("git", false, "Use git to manage files")
|
||||
// Deprecated
|
||||
ResetFlag = flag.Bool("reset", false, "Reset files to their original state")
|
||||
LogLevel = flag.String("loglevel", "INFO", "Set log level: ERROR, WARNING, INFO, DEBUG, TRACE")
|
||||
ParallelFiles = flag.Int("P", 100, "Number of files to process in parallel")
|
||||
Filter = flag.String("filter", "", "Filter commands before running them")
|
||||
)
|
||||
|
Reference in New Issue
Block a user