From d1b885ddcbb95c733987cb2825af41b6761afd00 Mon Sep 17 00:00:00 2001 From: Hamza El-Saawy Date: Mon, 29 Aug 2022 12:24:50 -0400 Subject: [PATCH] Update internal/socket go generate, spelling `./internal/socket/socket.go` uses `github.com/Microsoft/go-winio/tools/mkwinsyscall` instead of `golang.org/x/sys/windows/mkwinsyscall` for its `//go:generate` directive, keeping it consistent with the rest of the repo. Signed-off-by: Hamza El-Saawy --- .golangci.yml | 2 +- internal/socket/socket.go | 2 +- internal/socket/zsyscall_windows.go | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index f016bcc8..af403bb1 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -42,7 +42,7 @@ issues: text: "^line-length-limit: " source: "^//(go:generate|sys) " - # allow unjustified ignores of error checks in defer statments + # allow unjustified ignores of error checks in defer statements - linters: - nolintlint text: "^directive `//nolint:errcheck` should provide explanation" diff --git a/internal/socket/socket.go b/internal/socket/socket.go index 7f7993de..39e8c05f 100644 --- a/internal/socket/socket.go +++ b/internal/socket/socket.go @@ -14,7 +14,7 @@ import ( "golang.org/x/sys/windows" ) -//go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go socket.go +//go:generate go run github.com/Microsoft/go-winio/tools/mkwinsyscall -output zsyscall_windows.go socket.go //sys getsockname(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) [failretval==socketError] = ws2_32.getsockname //sys getpeername(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) [failretval==socketError] = ws2_32.getpeername diff --git a/internal/socket/zsyscall_windows.go b/internal/socket/zsyscall_windows.go index d1868e29..6d2e1a9e 100644 --- a/internal/socket/zsyscall_windows.go +++ b/internal/socket/zsyscall_windows.go @@ -1,4 +1,6 @@ -// Code generated by 'go generate'; DO NOT EDIT. +//go:build windows + +// Code generated by 'go generate' using "github.com/Microsoft/go-winio/tools/mkwinsyscall"; DO NOT EDIT. package socket