@@ -250,6 +250,8 @@ <h3 id="fuzzing">Fuzzing</h3>
250
250
251
251
< h3 id ="go-command "> Go command</ h3 >
252
252
253
+ < h4 id ="go-get "> < code > go</ code > < code > get</ code > </ h4 >
254
+
253
255
< p > <!-- golang.org/issue/43684 -->
254
256
< code > go</ code > < code > get</ code > no longer builds or installs packages in
255
257
module-aware mode. < code > go</ code > < code > get</ code > is now dedicated to
@@ -269,6 +271,8 @@ <h3 id="go-command">Go command</h3>
269
271
and installs packages, as before.
270
272
</ p >
271
273
274
+ < h4 id ="go-version "> < code > go</ code > < code > version</ code > </ h4 >
275
+
272
276
< p > <!-- golang.org/issue/37475 -->
273
277
The < code > go</ code > command now embeds version control information in
274
278
binaries including the currently checked-out revision, commit time, and a
@@ -303,6 +307,8 @@ <h3 id="go-command">Go command</h3>
303
307
< code > debug/buildinfo</ code > package from < code > go</ code > 1.18+.
304
308
</ p >
305
309
310
+ < h4 id ="go-mod-download "> < code > go</ code > < code > mod</ code > < code > download</ code > </ h4 >
311
+
306
312
< p > <!-- https://golang.org/issue/44435 -->
307
313
If the main module's < code > go.mod</ code > file
308
314
specifies < a href ="/ref/mod#go-mod-file-go "> < code > go</ code > < code > 1.17</ code > </ a >
@@ -316,6 +322,8 @@ <h3 id="go-command">Go command</h3>
316
322
< code > go</ code > < code > mod</ code > < code > download</ code > < code > all</ code > .
317
323
</ p >
318
324
325
+ < h4 id ="go-mod-vendor "> < code > go</ code > < code > mod</ code > < code > vendor</ code > </ h4 >
326
+
319
327
< p > <!-- https://golang.org/issue/47327 -->
320
328
The < code > go</ code > < code > mod</ code > < code > vendor</ code > subcommand now
321
329
supports a < code > -o</ code > flag to set the output directory.
@@ -325,13 +333,17 @@ <h3 id="go-command">Go command</h3>
325
333
third-party tools that need to collect package source code.)
326
334
</ p >
327
335
336
+ < h4 id ="go-mod-vendor "> < code > go</ code > < code > build</ code > < code > -asan</ code > </ h4 >
337
+
328
338
< p > <!-- CL 298612 -->
329
339
The < code > go</ code > < code > build</ code > command and related commands
330
340
now support an < code > -asan</ code > flag that enables interoperation
331
341
with C (or C++) code compiled with the address sanitizer (C compiler
332
342
option < code > -fsanitize=address</ code > ).
333
343
</ p >
334
344
345
+ < h4 id ="go-mod-tidy "> < code > go</ code > < code > mod</ code > < code > tidy</ code > </ h4 >
346
+
335
347
< p > <!-- https://golang.org/issue/47738, CL 344572 -->
336
348
The < code > go</ code > < code > mod</ code > < code > tidy</ code > command now retains
337
349
additional checksums in the < code > go.sum</ code > file for modules whose source
@@ -342,6 +354,8 @@ <h3 id="go-command">Go command</h3>
342
354
module's < code > go.mod</ code > file.
343
355
</ p >
344
356
357
+ < h4 id ="go-work "> < code > go</ code > < code > work</ code > </ h4 >
358
+
345
359
< p > <!-- https://golang.org/issue/45713 -->
346
360
The < code > go</ code > command now supports a "Workspace" mode. If a
347
361
< code > go.work</ code > file is found in the working directory or a
@@ -355,6 +369,8 @@ <h3 id="go-command">Go command</h3>
355
369
documentation.
356
370
</ p >
357
371
372
+ < h4 id ="go-test "> < code > go</ code > < code > test</ code > </ h4 >
373
+
358
374
< p > <!-- CL 251441 -->
359
375
The < code > go</ code > command now supports additional command line
360
376
options for the new < a href ="#fuzzing "> fuzzing support described
@@ -376,19 +392,36 @@ <h3 id="go-command">Go command</h3>
376
392
</ ul >
377
393
</ p >
378
394
395
+ < h4 id ="go-build-lines "> < code > //go:build</ code > lines</ h4 >
396
+
379
397
< p > <!-- CL 240611 -->
380
- TODO: < a href ="https://golang.org/cl/240611 "> https://golang.org/cl/240611</ a > : 240611: cmd/fix: add buildtag fix
398
+ Go 1.17 introduced < code > //go:build</ code > lines as a more readable way to write build constraints,
399
+ instead of < code > //</ code > < code > +build</ code > lines.
400
+ As of Go 1.17, < code > gofmt</ code > adds < code > //go:build</ code > lines
401
+ to match existing < code > +build</ code > lines and keeps them in sync,
402
+ while < code > go</ code > < code > vet</ code > diagnoses when they are out of sync.
403
+ </ p >
404
+
405
+ < p > Since the release of Go 1.18 marks the end of support for Go 1.16,
406
+ all supported versions of Go now understand < code > //go:build</ code > lines.
407
+ In Go 1.18, < code > go</ code > < code > fix</ code > now removes the now-obsolete
408
+ < code > //</ code > < code > +build</ code > lines in modules declaring
409
+ < code > go</ code > < code > 1.17</ code > or later in their < code > go.mod</ code > files.
410
+ </ p >
411
+
412
+ < p >
413
+ For more information, see < a href ="https://go.dev/design/draft-gobuild "> https://go.dev/design/draft-gobuild</ a > .
381
414
</ p >
382
415
383
- < h3 id ="gofmt "> < code > gofmt </ code > </ h3 >
416
+ < h3 id ="gofmt "> Gofmt </ h3 >
384
417
385
418
< p > <!-- https://golang.org/issue/43566 -->
386
419
< code > gofmt</ code > now reads and formats input files concurrently, with a
387
420
memory limit proportional to < code > GOMAXPROCS</ code > . On a machine with
388
421
multiple CPUs, < code > gofmt</ code > should now be significantly faster.
389
422
</ p >
390
423
391
- < h3 id ="vet "> < code > vet </ code > </ h3 >
424
+ < h3 id ="vet "> Vet </ h3 >
392
425
393
426
< h4 id ="vet-generics "> Updates for Generics</ h4 >
394
427
@@ -510,10 +543,17 @@ <h2 id="linker">Linker</h2>
510
543
new < code > go</ code > command < code > -asan</ code > option.
511
544
</ p >
512
545
513
- < h2 id ="build " > Build </ h2 >
546
+ < h2 id ="bootstrap " > Bootstrap </ h2 >
514
547
515
548
< p > <!-- CL 369914, CL 370274 -->
516
- TODO: < a href ="https://golang.org/cl/369914 "> https://golang.org/cl/369914</ a > : for default bootstrap, use Go 1.17 if present, falling back to Go 1.4
549
+ When building a Go release from source and < code > GOROOT_BOOTSTRAP</ code >
550
+ is not set, previous versions of Go looked for a Go 1.4 or later bootstrap toolchain
551
+ in the directory < code > $HOME/go1.4</ code > (< code > %HOMEDRIVE%%HOMEPATH%\go1.4</ code > on Windows).
552
+ Go now looks first for < code > $HOME/go1.17</ code > or < code > $HOME/sdk/go1.17</ code >
553
+ before falling back to < code > $HOME/go1.4</ code > .
554
+ We intend for Go 1.19 to require Go 1.17 or later for bootstrap,
555
+ and this change should make the transition smoother.
556
+ For more details, see < a href ="https://go.dev/issue/44505 "> go.dev/issue/44505</ a > .
517
557
</ p >
518
558
519
559
< h2 id ="library "> Core library</ h2 >
0 commit comments