diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ff667e74..243025f8 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/iphlpapi/iphlpapi.go b/iphlpapi/iphlpapi_windows.go similarity index 86% rename from iphlpapi/iphlpapi.go rename to iphlpapi/iphlpapi_windows.go index 6f399ee2..2c5db304 100644 --- a/iphlpapi/iphlpapi.go +++ b/iphlpapi/iphlpapi_windows.go @@ -1,6 +1,3 @@ -//go:build windows -// +build windows - package iphlpapi //sys AddIPAddress(Address uint32, IpMask uint32, IfIndex uint32, NTEContext *uint32, NTEInstance *uint32) (errcode error) = iphlpapi.AddIPAddress diff --git a/iphlpapi/mksyscall.go b/iphlpapi/mksyscall_windows.go similarity index 58% rename from iphlpapi/mksyscall.go rename to iphlpapi/mksyscall_windows.go index a38de2ab..0593ab83 100644 --- a/iphlpapi/mksyscall.go +++ b/iphlpapi/mksyscall_windows.go @@ -1,8 +1,6 @@ -//go:build windows -// +build windows - +//go:build generate // +build generate package iphlpapi -//go:generate go run golang.org/x/sys/windows/mkwinsyscall -output ziphlapi_windows.go iphlpapi.go +//go:generate go run golang.org/x/sys/windows/mkwinsyscall -output ziphlapi_windows.go iphlpapi_windows.go