From 8008a34281068d5ef5d78e5324902153385e5e4f Mon Sep 17 00:00:00 2001 From: maze Date: Wed, 24 Jul 2024 15:57:13 +0200 Subject: [PATCH] Added -quiet flag --- .gitea/workflows/release.yaml | 3 ++- cmd/update-ip/main.go | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 39215b5..59e1727 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -9,7 +9,8 @@ jobs: go-arch: [ 'amd64', 'arm64' ] steps: - - uses: actions/checkout@v4 + - name: Setup repository + uses: actions/checkout@v4 - name: Setup Go uses: actions/setup-go@v5 with: diff --git a/cmd/update-ip/main.go b/cmd/update-ip/main.go index 0995604..3592dcb 100644 --- a/cmd/update-ip/main.go +++ b/cmd/update-ip/main.go @@ -11,12 +11,15 @@ func main() { configFile := flag.String("config", "", "configuration file") debugFlag := flag.Bool("debug", false, "enable debug messages") traceFlag := flag.Bool("trace", false, "enable trace messages") + quietFlag := flag.Bool("quiet", false, "be quiet") flag.Parse() if *traceFlag { log.SetLevel(log.TraceLevel) } else if *debugFlag { log.SetLevel(log.DebugLevel) + } else if *quietFlag { + log.SetLevel(log.WarnLevel) } c, err := updateip.Load(*configFile)