diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ff667e7..243025f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,6 +24,7 @@ jobs: run: | go mod download go version + go generate ./... go build - name: GolangCI-Lint diff --git a/.golangci.yml b/.golangci.yml index 779fa0f..11054b1 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -8,10 +8,4 @@ linters: linters-settings: gocyclo: # minimal code complexity to report, 30 by default (but we recommend 10-20) - min-complexity: 16 - -run: - skip-dirs: - - iphlpapi - - package - - test + min-complexity: 16 \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml index d97bd0b..0bd6880 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -3,7 +3,6 @@ version: 2 before: hooks: - go mod tidy - - go generate ./... builds: - env: @@ -11,7 +10,8 @@ builds: goos: - linux - windows - # - darwin + hooks: + pre: go generate ./... archives: - name_template: >- diff --git a/iphlpapi/iphlpapi.go b/iphlpapi/iphlpapi_windows.go similarity index 100% rename from iphlpapi/iphlpapi.go rename to iphlpapi/iphlpapi_windows.go diff --git a/iphlpapi/mksyscall.go b/iphlpapi/mksyscall_windows.go similarity index 61% rename from iphlpapi/mksyscall.go rename to iphlpapi/mksyscall_windows.go index bc84a13..0593ab8 100644 --- a/iphlpapi/mksyscall.go +++ b/iphlpapi/mksyscall_windows.go @@ -1,5 +1,6 @@ +//go:build generate // +build generate package iphlpapi -//go:generate go run golang.org/x/sys/windows/mkwinsyscall -output ziphlapi.go iphlpapi.go +//go:generate go run golang.org/x/sys/windows/mkwinsyscall -output ziphlapi_windows.go iphlpapi_windows.go diff --git a/iphlpapi/ziphlapi.go b/iphlpapi/ziphlapi_windows.go similarity index 100% rename from iphlpapi/ziphlapi.go rename to iphlpapi/ziphlapi_windows.go