You've already forked getpsrc
fix(main): disable G706
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 17s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 6s
Lint Markdown files / Run markdown linter (push) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m5s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 36s
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 17s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 6s
Lint Markdown files / Run markdown linter (push) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m5s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 36s
This commit is contained in:
@@ -9,5 +9,10 @@ linters:
|
|||||||
rules: []
|
rules: []
|
||||||
warn-unused: true
|
warn-unused: true
|
||||||
|
|
||||||
|
settings:
|
||||||
|
gosec:
|
||||||
|
excludes:
|
||||||
|
- G706
|
||||||
|
|
||||||
run:
|
run:
|
||||||
tests: true
|
tests: true
|
||||||
|
|||||||
4
main.go
4
main.go
@@ -31,12 +31,12 @@ func main() {
|
|||||||
log.Fatalf("failed to get new routing instance: %v", err.Error())
|
log.Fatalf("failed to get new routing instance: %v", err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
_, _, prefferedSrc, err := router.Route(ip)
|
_, _, preferredSrc, err := router.Route(ip)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("failed to find gateway for ip: %v", err.Error())
|
log.Fatalf("failed to find gateway for ip: %v", err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = fmt.Fprintln(os.Stdout, prefferedSrc.String())
|
_, err = fmt.Fprintln(os.Stdout, preferredSrc.String())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("failed to print gateway on stdout: %v", err.Error())
|
log.Fatalf("failed to print gateway on stdout: %v", err.Error())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user