调整了go:build选项

This commit is contained in:
Yunlq committed 2025-09-13 19:48:17 +08:00
1 parent 867008a0c0
commit 1d1591ca6b
7 files changed
+8 -6

No files matched your search

+1 -1
View File
@@ -131,9 +131,9 @@ jobs:
fail-fast: false
matrix: { goarch: [ amd64, arm64 ] }
env:
CGO_ENABLED: 1
GOOS: darwin
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: 1
steps:
- name: Checkout codebase
uses: actions/checkout@v5
+2 -2
View File
@@ -50,11 +50,11 @@ jobs:
if: ${{ matrix.os != 'windows-latest' }}
shell: bash
run: |
sudo go env -w GOTOOLCHAIN=go1.25.0+auto
sudo go env -w GOTOOLCHAIN=go1.25.1+auto
sudo go test -v -ldflags=-checklinkname=0 -covermode=count -coverprofile='coverage.out' ./...
- name: Test with windows
if: ${{ matrix.os == 'windows-latest' }}
run: |
go env -w GOTOOLCHAIN=go1.25.0+auto
go env -w GOTOOLCHAIN=go1.25.1+auto
go test -v -ldflags=-checklinkname=0 -covermode=count -coverprofile="coverage.out" ./...
+1 -1
View File
@@ -1,4 +1,4 @@
//go:build !darwin && !windows
//go:build !darwin && !(windows && amd64)
package internal
+1 -1
View File
@@ -1,4 +1,4 @@
//go:build windows
//go:build windows && amd64
package internal
+1
View File
@@ -504,6 +504,7 @@ func (t *TCPTracer) send(ctx context.Context, s *internal.TCPSpec, ttl, i int) e
start, err := s.SendTCP(ctx, ipHeader, tcpHeader, payload)
if err != nil {
_ = t.clearPending(seq)
return err
}
t.storeSent(seq, SrcPort, start)
+1
View File
@@ -503,6 +503,7 @@ func (t *TCPTracerIPv6) send(ctx context.Context, s *internal.TCPSpec, ttl, i in
start, err := s.SendTCP(ctx, ipHeader, tcpHeader, payload)
if err != nil {
_ = t.clearPending(seq)
return err
}
t.storeSent(seq, SrcPort, start)
+1 -1
View File
@@ -1,4 +1,4 @@
//go:build darwin || windows
//go:build darwin || (windows && amd64)
package util