diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 8c24059..e118262 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -11,7 +11,7 @@ on: jobs: - build: + CI: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -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 ./... diff --git a/nat.go b/nat.go index 5634fd8..c20fbb6 100644 --- a/nat.go +++ b/nat.go @@ -22,7 +22,7 @@ func ToggleNAT(toggle bool) error { } f := t.AppendUnique - if toggle == Off { + if !toggle { f = t.DeleteIfExists }