diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 01e8c74..73baa1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go-version: [1.13, 1.14, 1.15] + go-version: [1.15, 1.16, 1.x] steps: - name: Install Go uses: actions/setup-go@v1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 23139f5..166e752 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: - name: Install Go uses: actions/setup-go@v1 with: - go-version: 1.15 + go-version: 1.17 - name: Checkout uses: actions/checkout@v2 diff --git a/cmd/check_fritz/main.go b/cmd/check_fritz/main.go index 4fd1f18..40221c5 100644 --- a/cmd/check_fritz/main.go +++ b/cmd/check_fritz/main.go @@ -2,9 +2,9 @@ package main import ( "fmt" - "os" - "github.com/urfave/cli/v2" + "os" + "runtime" ) // program version @@ -67,11 +67,6 @@ func (ai *ArgumentInformation) setDebugMode() { ai.Debug = true } -func printVersion() { - fmt.Println("check_fritz v" + Version) - GlobalReturnCode = exitOk -} - func checkRequiredFlags(aI *ArgumentInformation) bool { if aI.Hostname == nil || *aI.Hostname == "" { fmt.Println("No hostname") @@ -194,7 +189,7 @@ func main() { Action: checkMain, Name: "check_fritz", Usage: "Check plugin to monitor a Fritz!Box", - Version: Version, + Version: fmt.Sprintf("%s/%s", Version, runtime.Version()), Flags: []cli.Flag{ &cli.StringFlag{ Name: "hostname", @@ -294,11 +289,5 @@ METHODS: smart_socketenergy Total power consumption of the last year of a socket switch (requires AIN), smart_status current smart device status (requires AIN) ` - - cli.VersionFlag = &cli.BoolFlag{ - Name: "version", Aliases: []string{"V"}, - Usage: "print the version", - } - app.Run(os.Args) }