File tree 1 file changed +21
-1
lines changed
1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,27 @@ <h2 id="tools">Tools</h2>
32
32
</ p >
33
33
< h3 id ="go-command "> Go command</ h3 >
34
34
< p >
35
- TODO: complete this section, or delete if not needed
35
+ TODO: complete this section.
36
+ </ p >
37
+
38
+ <!-- https://go.dev/issue/51461 -->
39
+ < p >
40
+ Passing the < code > -trimpath</ code > flag to < code > go</ code > commands now
41
+ causes < code > runtime.GOROOT()</ code > in the resulting binary to return the
42
+ empty string instead of the string < code > "go"</ code > .
43
+ </ p >
44
+ < p >
45
+ The < code > -trimpath</ code > flag, if set, is now included in the build settings
46
+ stamped into Go binaries by < code > go</ code > < code > build</ code > , and can be
47
+ examined using
48
+ < a href ="https://pkg.go.dev/cmd/go#hdr-Print_Go_version "> < code > go</ code > < code > version</ code > < code > -m</ code > </ a >
49
+ or < a href ="https://pkg.go.dev/runtime/debug#ReadBuildInfo "> < code > debug.ReadBuildInfo</ code > </ a > .
50
+ </ p >
51
+ < p >
52
+ < code > go</ code > < code > generate</ code > now sets the < code > GOROOT</ code >
53
+ environment variable explicitly in the generator's environment, so that
54
+ generators can locate the correct < code > GOROOT</ code > even if built
55
+ with < code > -trimpath</ code > .
36
56
</ p >
37
57
38
58
< h4 id ="go-unix "> New < code > unix</ code > build constraint</ h4 >
You can’t perform that action at this time.
0 commit comments