Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Update Go versions #112

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 3 additions & 14 deletions cmd/check_fritz/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package main

import (
"fmt"
"os"

"github.com/urfave/cli/v2"
"os"
"runtime"
)

// program version
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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)
}