Skip to content

Commit 51fe20f

Browse files
committed
cmd/go/internal/imports: loadTags() should merge tags from BuildContext.ToolTags
1 parent 9f0f87c commit 51fe20f

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

src/cmd/go/internal/imports/tags.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ func loadTags() map[string]bool {
3636
for _, tag := range cfg.BuildContext.BuildTags {
3737
tags[tag] = true
3838
}
39+
for _, tag := range cfg.BuildContext.ToolTags {
40+
tags[tag] = true
41+
}
3942
for _, tag := range cfg.BuildContext.ReleaseTags {
4043
tags[tag] = true
4144
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Tests Issue #54468
2+
3+
go mod tidy
4+
go test -race ./...
5+
6+
stdout 'ok\s+testrace'
7+
8+
-- go.mod --
9+
module testrace
10+
11+
go 1.18
12+
13+
require rsc.io/sampler v1.0.0
14+
-- race_test.go --
15+
//go:build race
16+
17+
package testrace
18+
19+
import (
20+
"testing"
21+
22+
_ "rsc.io/sampler"
23+
)
24+
25+
func TestRaceTag(t *testing.T) {
26+
}

0 commit comments

Comments
 (0)