Added -quiet flag
Some checks failed
/ build (push) Failing after 4m45s

This commit is contained in:
maze 2024-07-24 15:57:13 +02:00
parent 3c2ab6ead2
commit 8008a34281
2 changed files with 5 additions and 1 deletions

View File

@ -9,7 +9,8 @@ jobs:
go-arch: [ 'amd64', 'arm64' ] go-arch: [ 'amd64', 'arm64' ]
steps: steps:
- uses: actions/checkout@v4 - name: Setup repository
uses: actions/checkout@v4
- name: Setup Go - name: Setup Go
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:

View File

@ -11,12 +11,15 @@ func main() {
configFile := flag.String("config", "", "configuration file") configFile := flag.String("config", "", "configuration file")
debugFlag := flag.Bool("debug", false, "enable debug messages") debugFlag := flag.Bool("debug", false, "enable debug messages")
traceFlag := flag.Bool("trace", false, "enable trace messages") traceFlag := flag.Bool("trace", false, "enable trace messages")
quietFlag := flag.Bool("quiet", false, "be quiet")
flag.Parse() flag.Parse()
if *traceFlag { if *traceFlag {
log.SetLevel(log.TraceLevel) log.SetLevel(log.TraceLevel)
} else if *debugFlag { } else if *debugFlag {
log.SetLevel(log.DebugLevel) log.SetLevel(log.DebugLevel)
} else if *quietFlag {
log.SetLevel(log.WarnLevel)
} }
c, err := updateip.Load(*configFile) c, err := updateip.Load(*configFile)