Skip to content
This repository has been archived by the owner on Dec 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6 from Amnesic-Systems/staticcheck
Browse files Browse the repository at this point in the history
Add staticcheck job to CI.
  • Loading branch information
NullHypothesis authored Mar 23, 2024
2 parents 3553f86 + 9b3c6c5 commit 29f0303
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:

build:
CI:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -24,5 +24,10 @@ jobs:
- name: Build
run: go build -v ./...

- name: Staticcheck
uses: dominikh/staticcheck-action@v1.3.0
with:
version: "2022.1.3"

- name: Test
run: go test -v ./...
run: go test -v -race ./...
2 changes: 1 addition & 1 deletion nat.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func ToggleNAT(toggle bool) error {
}

f := t.AppendUnique
if toggle == Off {
if !toggle {
f = t.DeleteIfExists
}

Expand Down

0 comments on commit 29f0303

Please sign in to comment.