2 Commits

2 changed files with 5 additions and 4 deletions

View File

@ -26,4 +26,4 @@ jobs:
go-version: ${{ matrix.go }} go-version: ${{ matrix.go }}
- uses: golangci/golangci-lint-action@v8.0.0 - uses: golangci/golangci-lint-action@v8.0.0
with: with:
v2.3.1 # renovate: datasource=github-releases depName=golangci/golangci-lint version: v2.4.0 # renovate: datasource=github-releases depName=golangci/golangci-lint

View File

@ -8,8 +8,6 @@ import (
"strings" "strings"
) )
var version string
func main() { func main() {
ips := os.Args[1:] ips := os.Args[1:]
switch { switch {
@ -34,7 +32,10 @@ func main() {
for _, addr := range addrs { for _, addr := range addrs {
if strings.Split(addr.String(), "/")[0] == ip { if strings.Split(addr.String(), "/")[0] == ip {
fmt.Fprintln(os.Stdout, iface.Name) _, err = fmt.Fprintln(os.Stdout, iface.Name)
if err != nil {
log.Fatal(err.Error())
}
return return
} }
} }