]> Cypherpunks.ru repositories - gostls13.git/blob - src/cmd/go/alldocs.go
[dev.fuzz] all: merge master (af72ddf) into dev.fuzz
[gostls13.git] / src / cmd / go / alldocs.go
1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // Code generated by mkalldocs.sh; DO NOT EDIT.
6 // Edit the documentation in other files and rerun mkalldocs.sh to generate this one.
7
8 // Go is a tool for managing Go source code.
9 //
10 // Usage:
11 //
12 //      go <command> [arguments]
13 //
14 // The commands are:
15 //
16 //      bug         start a bug report
17 //      build       compile packages and dependencies
18 //      clean       remove object files and cached files
19 //      doc         show documentation for package or symbol
20 //      env         print Go environment information
21 //      fix         update packages to use new APIs
22 //      fmt         gofmt (reformat) package sources
23 //      generate    generate Go files by processing source
24 //      get         add dependencies to current module and install them
25 //      install     compile and install packages and dependencies
26 //      list        list packages or modules
27 //      mod         module maintenance
28 //      run         compile and run Go program
29 //      test        test packages
30 //      tool        run specified go tool
31 //      version     print Go version
32 //      vet         report likely mistakes in packages
33 //
34 // Use "go help <command>" for more information about a command.
35 //
36 // Additional help topics:
37 //
38 //      buildconstraint build constraints
39 //      buildmode       build modes
40 //      c               calling between Go and C
41 //      cache           build and test caching
42 //      environment     environment variables
43 //      filetype        file types
44 //      go.mod          the go.mod file
45 //      gopath          GOPATH environment variable
46 //      gopath-get      legacy GOPATH go get
47 //      goproxy         module proxy protocol
48 //      importpath      import path syntax
49 //      modules         modules, module versions, and more
50 //      module-get      module-aware go get
51 //      module-auth     module authentication using go.sum
52 //      packages        package lists and patterns
53 //      private         configuration for downloading non-public code
54 //      testflag        testing flags
55 //      testfunc        testing functions
56 //      fuzz            fuzzing
57 //      vcs             controlling version control with GOVCS
58 //
59 // Use "go help <topic>" for more information about that topic.
60 //
61 //
62 // Start a bug report
63 //
64 // Usage:
65 //
66 //      go bug
67 //
68 // Bug opens the default browser and starts a new bug report.
69 // The report includes useful system information.
70 //
71 //
72 // Compile packages and dependencies
73 //
74 // Usage:
75 //
76 //      go build [-o output] [build flags] [packages]
77 //
78 // Build compiles the packages named by the import paths,
79 // along with their dependencies, but it does not install the results.
80 //
81 // If the arguments to build are a list of .go files from a single directory,
82 // build treats them as a list of source files specifying a single package.
83 //
84 // When compiling packages, build ignores files that end in '_test.go'.
85 //
86 // When compiling a single main package, build writes
87 // the resulting executable to an output file named after
88 // the first source file ('go build ed.go rx.go' writes 'ed' or 'ed.exe')
89 // or the source code directory ('go build unix/sam' writes 'sam' or 'sam.exe').
90 // The '.exe' suffix is added when writing a Windows executable.
91 //
92 // When compiling multiple packages or a single non-main package,
93 // build compiles the packages but discards the resulting object,
94 // serving only as a check that the packages can be built.
95 //
96 // The -o flag forces build to write the resulting executable or object
97 // to the named output file or directory, instead of the default behavior described
98 // in the last two paragraphs. If the named output is an existing directory or
99 // ends with a slash or backslash, then any resulting executables
100 // will be written to that directory.
101 //
102 // The -i flag installs the packages that are dependencies of the target.
103 // The -i flag is deprecated. Compiled packages are cached automatically.
104 //
105 // The build flags are shared by the build, clean, get, install, list, run,
106 // and test commands:
107 //
108 //      -a
109 //              force rebuilding of packages that are already up-to-date.
110 //      -n
111 //              print the commands but do not run them.
112 //      -p n
113 //              the number of programs, such as build commands or
114 //              test binaries, that can be run in parallel.
115 //              The default is GOMAXPROCS, normally the number of CPUs available.
116 //      -race
117 //              enable data race detection.
118 //              Supported only on linux/amd64, freebsd/amd64, darwin/amd64, windows/amd64,
119 //              linux/ppc64le and linux/arm64 (only for 48-bit VMA).
120 //      -msan
121 //              enable interoperation with memory sanitizer.
122 //              Supported only on linux/amd64, linux/arm64
123 //              and only with Clang/LLVM as the host C compiler.
124 //              On linux/arm64, pie build mode will be used.
125 //      -v
126 //              print the names of packages as they are compiled.
127 //      -work
128 //              print the name of the temporary work directory and
129 //              do not delete it when exiting.
130 //      -x
131 //              print the commands.
132 //
133 //      -asmflags '[pattern=]arg list'
134 //              arguments to pass on each go tool asm invocation.
135 //      -buildmode mode
136 //              build mode to use. See 'go help buildmode' for more.
137 //      -compiler name
138 //              name of compiler to use, as in runtime.Compiler (gccgo or gc).
139 //      -gccgoflags '[pattern=]arg list'
140 //              arguments to pass on each gccgo compiler/linker invocation.
141 //      -gcflags '[pattern=]arg list'
142 //              arguments to pass on each go tool compile invocation.
143 //      -installsuffix suffix
144 //              a suffix to use in the name of the package installation directory,
145 //              in order to keep output separate from default builds.
146 //              If using the -race flag, the install suffix is automatically set to race
147 //              or, if set explicitly, has _race appended to it. Likewise for the -msan
148 //              flag. Using a -buildmode option that requires non-default compile flags
149 //              has a similar effect.
150 //      -ldflags '[pattern=]arg list'
151 //              arguments to pass on each go tool link invocation.
152 //      -linkshared
153 //              build code that will be linked against shared libraries previously
154 //              created with -buildmode=shared.
155 //      -mod mode
156 //              module download mode to use: readonly, vendor, or mod.
157 //              By default, if a vendor directory is present and the go version in go.mod
158 //              is 1.14 or higher, the go command acts as if -mod=vendor were set.
159 //              Otherwise, the go command acts as if -mod=readonly were set.
160 //              See https://golang.org/ref/mod#build-commands for details.
161 //      -modcacherw
162 //              leave newly-created directories in the module cache read-write
163 //              instead of making them read-only.
164 //      -modfile file
165 //              in module aware mode, read (and possibly write) an alternate go.mod
166 //              file instead of the one in the module root directory. A file named
167 //              "go.mod" must still be present in order to determine the module root
168 //              directory, but it is not accessed. When -modfile is specified, an
169 //              alternate go.sum file is also used: its path is derived from the
170 //              -modfile flag by trimming the ".mod" extension and appending ".sum".
171 //   -workfile file
172 //     in module aware mode, use the given go.work file as a workspace file.
173 //              By default or when -workfile is "auto", the go command searches for a
174 //              file named go.work in the current directory and then containing directories
175 //              until one is found. If a valid go.work file is found, the modules
176 //              specified will collectively be used as the main modules. If -workfile
177 //              is "off", or a go.work file is not found in "auto" mode, workspace
178 //              mode is disabled.
179 //      -overlay file
180 //              read a JSON config file that provides an overlay for build operations.
181 //              The file is a JSON struct with a single field, named 'Replace', that
182 //              maps each disk file path (a string) to its backing file path, so that
183 //              a build will run as if the disk file path exists with the contents
184 //              given by the backing file paths, or as if the disk file path does not
185 //              exist if its backing file path is empty. Support for the -overlay flag
186 //              has some limitations: importantly, cgo files included from outside the
187 //              include path must be in the same directory as the Go package they are
188 //              included from, and overlays will not appear when binaries and tests are
189 //              run through go run and go test respectively.
190 //      -pkgdir dir
191 //              install and load all packages from dir instead of the usual locations.
192 //              For example, when building with a non-standard configuration,
193 //              use -pkgdir to keep generated packages in a separate location.
194 //      -tags tag,list
195 //              a comma-separated list of build tags to consider satisfied during the
196 //              build. For more information about build tags, see the description of
197 //              build constraints in the documentation for the go/build package.
198 //              (Earlier versions of Go used a space-separated list, and that form
199 //              is deprecated but still recognized.)
200 //      -trimpath
201 //              remove all file system paths from the resulting executable.
202 //              Instead of absolute file system paths, the recorded file names
203 //              will begin with either "go" (for the standard library),
204 //              or a module path@version (when using modules),
205 //              or a plain import path (when using GOPATH).
206 //      -toolexec 'cmd args'
207 //              a program to use to invoke toolchain programs like vet and asm.
208 //              For example, instead of running asm, the go command will run
209 //              'cmd args /path/to/asm <arguments for asm>'.
210 //              The TOOLEXEC_IMPORTPATH environment variable will be set,
211 //              matching 'go list -f {{.ImportPath}}' for the package being built.
212 //
213 // The -asmflags, -gccgoflags, -gcflags, and -ldflags flags accept a
214 // space-separated list of arguments to pass to an underlying tool
215 // during the build. To embed spaces in an element in the list, surround
216 // it with either single or double quotes. The argument list may be
217 // preceded by a package pattern and an equal sign, which restricts
218 // the use of that argument list to the building of packages matching
219 // that pattern (see 'go help packages' for a description of package
220 // patterns). Without a pattern, the argument list applies only to the
221 // packages named on the command line. The flags may be repeated
222 // with different patterns in order to specify different arguments for
223 // different sets of packages. If a package matches patterns given in
224 // multiple flags, the latest match on the command line wins.
225 // For example, 'go build -gcflags=-S fmt' prints the disassembly
226 // only for package fmt, while 'go build -gcflags=all=-S fmt'
227 // prints the disassembly for fmt and all its dependencies.
228 //
229 // For more about specifying packages, see 'go help packages'.
230 // For more about where packages and binaries are installed,
231 // run 'go help gopath'.
232 // For more about calling between Go and C/C++, run 'go help c'.
233 //
234 // Note: Build adheres to certain conventions such as those described
235 // by 'go help gopath'. Not all projects can follow these conventions,
236 // however. Installations that have their own conventions or that use
237 // a separate software build system may choose to use lower-level
238 // invocations such as 'go tool compile' and 'go tool link' to avoid
239 // some of the overheads and design decisions of the build tool.
240 //
241 // See also: go install, go get, go clean.
242 //
243 //
244 // Remove object files and cached files
245 //
246 // Usage:
247 //
248 //      go clean [clean flags] [build flags] [packages]
249 //
250 // Clean removes object files from package source directories.
251 // The go command builds most objects in a temporary directory,
252 // so go clean is mainly concerned with object files left by other
253 // tools or by manual invocations of go build.
254 //
255 // If a package argument is given or the -i or -r flag is set,
256 // clean removes the following files from each of the
257 // source directories corresponding to the import paths:
258 //
259 //      _obj/            old object directory, left from Makefiles
260 //      _test/           old test directory, left from Makefiles
261 //      _testmain.go     old gotest file, left from Makefiles
262 //      test.out         old test log, left from Makefiles
263 //      build.out        old test log, left from Makefiles
264 //      *.[568ao]        object files, left from Makefiles
265 //
266 //      DIR(.exe)        from go build
267 //      DIR.test(.exe)   from go test -c
268 //      MAINFILE(.exe)   from go build MAINFILE.go
269 //      *.so             from SWIG
270 //
271 // In the list, DIR represents the final path element of the
272 // directory, and MAINFILE is the base name of any Go source
273 // file in the directory that is not included when building
274 // the package.
275 //
276 // The -i flag causes clean to remove the corresponding installed
277 // archive or binary (what 'go install' would create).
278 //
279 // The -n flag causes clean to print the remove commands it would execute,
280 // but not run them.
281 //
282 // The -r flag causes clean to be applied recursively to all the
283 // dependencies of the packages named by the import paths.
284 //
285 // The -x flag causes clean to print remove commands as it executes them.
286 //
287 // The -cache flag causes clean to remove the entire go build cache.
288 //
289 // The -testcache flag causes clean to expire all test results in the
290 // go build cache.
291 //
292 // The -modcache flag causes clean to remove the entire module
293 // download cache, including unpacked source code of versioned
294 // dependencies.
295 //
296 // The -fuzzcache flag causes clean to remove values used for fuzz testing.
297 //
298 // For more about build flags, see 'go help build'.
299 //
300 // For more about specifying packages, see 'go help packages'.
301 //
302 //
303 // Show documentation for package or symbol
304 //
305 // Usage:
306 //
307 //      go doc [doc flags] [package|[package.]symbol[.methodOrField]]
308 //
309 // Doc prints the documentation comments associated with the item identified by its
310 // arguments (a package, const, func, type, var, method, or struct field)
311 // followed by a one-line summary of each of the first-level items "under"
312 // that item (package-level declarations for a package, methods for a type,
313 // etc.).
314 //
315 // Doc accepts zero, one, or two arguments.
316 //
317 // Given no arguments, that is, when run as
318 //
319 //      go doc
320 //
321 // it prints the package documentation for the package in the current directory.
322 // If the package is a command (package main), the exported symbols of the package
323 // are elided from the presentation unless the -cmd flag is provided.
324 //
325 // When run with one argument, the argument is treated as a Go-syntax-like
326 // representation of the item to be documented. What the argument selects depends
327 // on what is installed in GOROOT and GOPATH, as well as the form of the argument,
328 // which is schematically one of these:
329 //
330 //      go doc <pkg>
331 //      go doc <sym>[.<methodOrField>]
332 //      go doc [<pkg>.]<sym>[.<methodOrField>]
333 //      go doc [<pkg>.][<sym>.]<methodOrField>
334 //
335 // The first item in this list matched by the argument is the one whose documentation
336 // is printed. (See the examples below.) However, if the argument starts with a capital
337 // letter it is assumed to identify a symbol or method in the current directory.
338 //
339 // For packages, the order of scanning is determined lexically in breadth-first order.
340 // That is, the package presented is the one that matches the search and is nearest
341 // the root and lexically first at its level of the hierarchy. The GOROOT tree is
342 // always scanned in its entirety before GOPATH.
343 //
344 // If there is no package specified or matched, the package in the current
345 // directory is selected, so "go doc Foo" shows the documentation for symbol Foo in
346 // the current package.
347 //
348 // The package path must be either a qualified path or a proper suffix of a
349 // path. The go tool's usual package mechanism does not apply: package path
350 // elements like . and ... are not implemented by go doc.
351 //
352 // When run with two arguments, the first must be a full package path (not just a
353 // suffix), and the second is a symbol, or symbol with method or struct field.
354 // This is similar to the syntax accepted by godoc:
355 //
356 //      go doc <pkg> <sym>[.<methodOrField>]
357 //
358 // In all forms, when matching symbols, lower-case letters in the argument match
359 // either case but upper-case letters match exactly. This means that there may be
360 // multiple matches of a lower-case argument in a package if different symbols have
361 // different cases. If this occurs, documentation for all matches is printed.
362 //
363 // Examples:
364 //      go doc
365 //              Show documentation for current package.
366 //      go doc Foo
367 //              Show documentation for Foo in the current package.
368 //              (Foo starts with a capital letter so it cannot match
369 //              a package path.)
370 //      go doc encoding/json
371 //              Show documentation for the encoding/json package.
372 //      go doc json
373 //              Shorthand for encoding/json.
374 //      go doc json.Number (or go doc json.number)
375 //              Show documentation and method summary for json.Number.
376 //      go doc json.Number.Int64 (or go doc json.number.int64)
377 //              Show documentation for json.Number's Int64 method.
378 //      go doc cmd/doc
379 //              Show package docs for the doc command.
380 //      go doc -cmd cmd/doc
381 //              Show package docs and exported symbols within the doc command.
382 //      go doc template.new
383 //              Show documentation for html/template's New function.
384 //              (html/template is lexically before text/template)
385 //      go doc text/template.new # One argument
386 //              Show documentation for text/template's New function.
387 //      go doc text/template new # Two arguments
388 //              Show documentation for text/template's New function.
389 //
390 //      At least in the current tree, these invocations all print the
391 //      documentation for json.Decoder's Decode method:
392 //
393 //      go doc json.Decoder.Decode
394 //      go doc json.decoder.decode
395 //      go doc json.decode
396 //      cd go/src/encoding/json; go doc decode
397 //
398 // Flags:
399 //      -all
400 //              Show all the documentation for the package.
401 //      -c
402 //              Respect case when matching symbols.
403 //      -cmd
404 //              Treat a command (package main) like a regular package.
405 //              Otherwise package main's exported symbols are hidden
406 //              when showing the package's top-level documentation.
407 //      -short
408 //              One-line representation for each symbol.
409 //      -src
410 //              Show the full source code for the symbol. This will
411 //              display the full Go source of its declaration and
412 //              definition, such as a function definition (including
413 //              the body), type declaration or enclosing const
414 //              block. The output may therefore include unexported
415 //              details.
416 //      -u
417 //              Show documentation for unexported as well as exported
418 //              symbols, methods, and fields.
419 //
420 //
421 // Print Go environment information
422 //
423 // Usage:
424 //
425 //      go env [-json] [-u] [-w] [var ...]
426 //
427 // Env prints Go environment information.
428 //
429 // By default env prints information as a shell script
430 // (on Windows, a batch file). If one or more variable
431 // names is given as arguments, env prints the value of
432 // each named variable on its own line.
433 //
434 // The -json flag prints the environment in JSON format
435 // instead of as a shell script.
436 //
437 // The -u flag requires one or more arguments and unsets
438 // the default setting for the named environment variables,
439 // if one has been set with 'go env -w'.
440 //
441 // The -w flag requires one or more arguments of the
442 // form NAME=VALUE and changes the default settings
443 // of the named environment variables to the given values.
444 //
445 // For more about environment variables, see 'go help environment'.
446 //
447 //
448 // Update packages to use new APIs
449 //
450 // Usage:
451 //
452 //      go fix [packages]
453 //
454 // Fix runs the Go fix command on the packages named by the import paths.
455 //
456 // For more about fix, see 'go doc cmd/fix'.
457 // For more about specifying packages, see 'go help packages'.
458 //
459 // To run fix with specific options, run 'go tool fix'.
460 //
461 // See also: go fmt, go vet.
462 //
463 //
464 // Gofmt (reformat) package sources
465 //
466 // Usage:
467 //
468 //      go fmt [-n] [-x] [packages]
469 //
470 // Fmt runs the command 'gofmt -l -w' on the packages named
471 // by the import paths. It prints the names of the files that are modified.
472 //
473 // For more about gofmt, see 'go doc cmd/gofmt'.
474 // For more about specifying packages, see 'go help packages'.
475 //
476 // The -n flag prints commands that would be executed.
477 // The -x flag prints commands as they are executed.
478 //
479 // The -mod flag's value sets which module download mode
480 // to use: readonly or vendor. See 'go help modules' for more.
481 //
482 // To run gofmt with specific options, run gofmt itself.
483 //
484 // See also: go fix, go vet.
485 //
486 //
487 // Generate Go files by processing source
488 //
489 // Usage:
490 //
491 //      go generate [-run regexp] [-n] [-v] [-x] [build flags] [file.go... | packages]
492 //
493 // Generate runs commands described by directives within existing
494 // files. Those commands can run any process but the intent is to
495 // create or update Go source files.
496 //
497 // Go generate is never run automatically by go build, go get, go test,
498 // and so on. It must be run explicitly.
499 //
500 // Go generate scans the file for directives, which are lines of
501 // the form,
502 //
503 //      //go:generate command argument...
504 //
505 // (note: no leading spaces and no space in "//go") where command
506 // is the generator to be run, corresponding to an executable file
507 // that can be run locally. It must either be in the shell path
508 // (gofmt), a fully qualified path (/usr/you/bin/mytool), or a
509 // command alias, described below.
510 //
511 // Note that go generate does not parse the file, so lines that look
512 // like directives in comments or multiline strings will be treated
513 // as directives.
514 //
515 // The arguments to the directive are space-separated tokens or
516 // double-quoted strings passed to the generator as individual
517 // arguments when it is run.
518 //
519 // Quoted strings use Go syntax and are evaluated before execution; a
520 // quoted string appears as a single argument to the generator.
521 //
522 // To convey to humans and machine tools that code is generated,
523 // generated source should have a line that matches the following
524 // regular expression (in Go syntax):
525 //
526 //      ^// Code generated .* DO NOT EDIT\.$
527 //
528 // This line must appear before the first non-comment, non-blank
529 // text in the file.
530 //
531 // Go generate sets several variables when it runs the generator:
532 //
533 //      $GOARCH
534 //              The execution architecture (arm, amd64, etc.)
535 //      $GOOS
536 //              The execution operating system (linux, windows, etc.)
537 //      $GOFILE
538 //              The base name of the file.
539 //      $GOLINE
540 //              The line number of the directive in the source file.
541 //      $GOPACKAGE
542 //              The name of the package of the file containing the directive.
543 //      $DOLLAR
544 //              A dollar sign.
545 //
546 // Other than variable substitution and quoted-string evaluation, no
547 // special processing such as "globbing" is performed on the command
548 // line.
549 //
550 // As a last step before running the command, any invocations of any
551 // environment variables with alphanumeric names, such as $GOFILE or
552 // $HOME, are expanded throughout the command line. The syntax for
553 // variable expansion is $NAME on all operating systems. Due to the
554 // order of evaluation, variables are expanded even inside quoted
555 // strings. If the variable NAME is not set, $NAME expands to the
556 // empty string.
557 //
558 // A directive of the form,
559 //
560 //      //go:generate -command xxx args...
561 //
562 // specifies, for the remainder of this source file only, that the
563 // string xxx represents the command identified by the arguments. This
564 // can be used to create aliases or to handle multiword generators.
565 // For example,
566 //
567 //      //go:generate -command foo go tool foo
568 //
569 // specifies that the command "foo" represents the generator
570 // "go tool foo".
571 //
572 // Generate processes packages in the order given on the command line,
573 // one at a time. If the command line lists .go files from a single directory,
574 // they are treated as a single package. Within a package, generate processes the
575 // source files in a package in file name order, one at a time. Within
576 // a source file, generate runs generators in the order they appear
577 // in the file, one at a time. The go generate tool also sets the build
578 // tag "generate" so that files may be examined by go generate but ignored
579 // during build.
580 //
581 // For packages with invalid code, generate processes only source files with a
582 // valid package clause.
583 //
584 // If any generator returns an error exit status, "go generate" skips
585 // all further processing for that package.
586 //
587 // The generator is run in the package's source directory.
588 //
589 // Go generate accepts one specific flag:
590 //
591 //      -run=""
592 //              if non-empty, specifies a regular expression to select
593 //              directives whose full original source text (excluding
594 //              any trailing spaces and final newline) matches the
595 //              expression.
596 //
597 // It also accepts the standard build flags including -v, -n, and -x.
598 // The -v flag prints the names of packages and files as they are
599 // processed.
600 // The -n flag prints commands that would be executed.
601 // The -x flag prints commands as they are executed.
602 //
603 // For more about build flags, see 'go help build'.
604 //
605 // For more about specifying packages, see 'go help packages'.
606 //
607 //
608 // Add dependencies to current module and install them
609 //
610 // Usage:
611 //
612 //      go get [-d] [-t] [-u] [-v] [build flags] [packages]
613 //
614 // Get resolves its command-line arguments to packages at specific module versions,
615 // updates go.mod to require those versions, downloads source code into the
616 // module cache, then builds and installs the named packages.
617 //
618 // To add a dependency for a package or upgrade it to its latest version:
619 //
620 //      go get example.com/pkg
621 //
622 // To upgrade or downgrade a package to a specific version:
623 //
624 //      go get example.com/pkg@v1.2.3
625 //
626 // To remove a dependency on a module and downgrade modules that require it:
627 //
628 //      go get example.com/mod@none
629 //
630 // See https://golang.org/ref/mod#go-get for details.
631 //
632 // The 'go install' command may be used to build and install packages. When a
633 // version is specified, 'go install' runs in module-aware mode and ignores
634 // the go.mod file in the current directory. For example:
635 //
636 //      go install example.com/pkg@v1.2.3
637 //      go install example.com/pkg@latest
638 //
639 // See 'go help install' or https://golang.org/ref/mod#go-install for details.
640 //
641 // In addition to build flags (listed in 'go help build') 'go get' accepts the
642 // following flags.
643 //
644 // The -t flag instructs get to consider modules needed to build tests of
645 // packages specified on the command line.
646 //
647 // The -u flag instructs get to update modules providing dependencies
648 // of packages named on the command line to use newer minor or patch
649 // releases when available.
650 //
651 // The -u=patch flag (not -u patch) also instructs get to update dependencies,
652 // but changes the default to select patch releases.
653 //
654 // When the -t and -u flags are used together, get will update
655 // test dependencies as well.
656 //
657 // The -d flag instructs get not to build or install packages. get will only
658 // update go.mod and download source code needed to build packages.
659 //
660 // Building and installing packages with get is deprecated. In a future release,
661 // the -d flag will be enabled by default, and 'go get' will be only be used to
662 // adjust dependencies of the current module. To install a package using
663 // dependencies from the current module, use 'go install'. To install a package
664 // ignoring the current module, use 'go install' with an @version suffix like
665 // "@latest" after each argument.
666 //
667 // For more about modules, see https://golang.org/ref/mod.
668 //
669 // For more about specifying packages, see 'go help packages'.
670 //
671 // This text describes the behavior of get using modules to manage source
672 // code and dependencies. If instead the go command is running in GOPATH
673 // mode, the details of get's flags and effects change, as does 'go help get'.
674 // See 'go help gopath-get'.
675 //
676 // See also: go build, go install, go clean, go mod.
677 //
678 //
679 // Compile and install packages and dependencies
680 //
681 // Usage:
682 //
683 //      go install [build flags] [packages]
684 //
685 // Install compiles and installs the packages named by the import paths.
686 //
687 // Executables are installed in the directory named by the GOBIN environment
688 // variable, which defaults to $GOPATH/bin or $HOME/go/bin if the GOPATH
689 // environment variable is not set. Executables in $GOROOT
690 // are installed in $GOROOT/bin or $GOTOOLDIR instead of $GOBIN.
691 //
692 // If the arguments have version suffixes (like @latest or @v1.0.0), "go install"
693 // builds packages in module-aware mode, ignoring the go.mod file in the current
694 // directory or any parent directory, if there is one. This is useful for
695 // installing executables without affecting the dependencies of the main module.
696 // To eliminate ambiguity about which module versions are used in the build, the
697 // arguments must satisfy the following constraints:
698 //
699 // - Arguments must be package paths or package patterns (with "..." wildcards).
700 // They must not be standard packages (like fmt), meta-patterns (std, cmd,
701 // all), or relative or absolute file paths.
702 //
703 // - All arguments must have the same version suffix. Different queries are not
704 // allowed, even if they refer to the same version.
705 //
706 // - All arguments must refer to packages in the same module at the same version.
707 //
708 // - Package path arguments must refer to main packages. Pattern arguments
709 // will only match main packages.
710 //
711 // - No module is considered the "main" module. If the module containing
712 // packages named on the command line has a go.mod file, it must not contain
713 // directives (replace and exclude) that would cause it to be interpreted
714 // differently than if it were the main module. The module must not require
715 // a higher version of itself.
716 //
717 // - Vendor directories are not used in any module. (Vendor directories are not
718 // included in the module zip files downloaded by 'go install'.)
719 //
720 // If the arguments don't have version suffixes, "go install" may run in
721 // module-aware mode or GOPATH mode, depending on the GO111MODULE environment
722 // variable and the presence of a go.mod file. See 'go help modules' for details.
723 // If module-aware mode is enabled, "go install" runs in the context of the main
724 // module.
725 //
726 // When module-aware mode is disabled, other packages are installed in the
727 // directory $GOPATH/pkg/$GOOS_$GOARCH. When module-aware mode is enabled,
728 // other packages are built and cached but not installed.
729 //
730 // The -i flag installs the dependencies of the named packages as well.
731 // The -i flag is deprecated. Compiled packages are cached automatically.
732 //
733 // For more about the build flags, see 'go help build'.
734 // For more about specifying packages, see 'go help packages'.
735 //
736 // See also: go build, go get, go clean.
737 //
738 //
739 // List packages or modules
740 //
741 // Usage:
742 //
743 //      go list [-f format] [-json] [-m] [list flags] [build flags] [packages]
744 //
745 // List lists the named packages, one per line.
746 // The most commonly-used flags are -f and -json, which control the form
747 // of the output printed for each package. Other list flags, documented below,
748 // control more specific details.
749 //
750 // The default output shows the package import path:
751 //
752 //     bytes
753 //     encoding/json
754 //     github.com/gorilla/mux
755 //     golang.org/x/net/html
756 //
757 // The -f flag specifies an alternate format for the list, using the
758 // syntax of package template. The default output is equivalent
759 // to -f '{{.ImportPath}}'. The struct being passed to the template is:
760 //
761 //     type Package struct {
762 //         Dir           string   // directory containing package sources
763 //         ImportPath    string   // import path of package in dir
764 //         ImportComment string   // path in import comment on package statement
765 //         Name          string   // package name
766 //         Doc           string   // package documentation string
767 //         Target        string   // install path
768 //         Shlib         string   // the shared library that contains this package (only set when -linkshared)
769 //         Goroot        bool     // is this package in the Go root?
770 //         Standard      bool     // is this package part of the standard Go library?
771 //         Stale         bool     // would 'go install' do anything for this package?
772 //         StaleReason   string   // explanation for Stale==true
773 //         Root          string   // Go root or Go path dir containing this package
774 //         ConflictDir   string   // this directory shadows Dir in $GOPATH
775 //         BinaryOnly    bool     // binary-only package (no longer supported)
776 //         ForTest       string   // package is only for use in named test
777 //         Export        string   // file containing export data (when using -export)
778 //         BuildID       string   // build ID of the compiled package (when using -export)
779 //         Module        *Module  // info about package's containing module, if any (can be nil)
780 //         Match         []string // command-line patterns matching this package
781 //         DepOnly       bool     // package is only a dependency, not explicitly listed
782 //
783 //         // Source files
784 //         GoFiles         []string   // .go source files (excluding CgoFiles, TestGoFiles, XTestGoFiles)
785 //         CgoFiles        []string   // .go source files that import "C"
786 //         CompiledGoFiles []string   // .go files presented to compiler (when using -compiled)
787 //         IgnoredGoFiles  []string   // .go source files ignored due to build constraints
788 //         IgnoredOtherFiles []string // non-.go source files ignored due to build constraints
789 //         CFiles          []string   // .c source files
790 //         CXXFiles        []string   // .cc, .cxx and .cpp source files
791 //         MFiles          []string   // .m source files
792 //         HFiles          []string   // .h, .hh, .hpp and .hxx source files
793 //         FFiles          []string   // .f, .F, .for and .f90 Fortran source files
794 //         SFiles          []string   // .s source files
795 //         SwigFiles       []string   // .swig files
796 //         SwigCXXFiles    []string   // .swigcxx files
797 //         SysoFiles       []string   // .syso object files to add to archive
798 //         TestGoFiles     []string   // _test.go files in package
799 //         XTestGoFiles    []string   // _test.go files outside package
800 //
801 //         // Embedded files
802 //         EmbedPatterns      []string // //go:embed patterns
803 //         EmbedFiles         []string // files matched by EmbedPatterns
804 //         TestEmbedPatterns  []string // //go:embed patterns in TestGoFiles
805 //         TestEmbedFiles     []string // files matched by TestEmbedPatterns
806 //         XTestEmbedPatterns []string // //go:embed patterns in XTestGoFiles
807 //         XTestEmbedFiles    []string // files matched by XTestEmbedPatterns
808 //
809 //         // Cgo directives
810 //         CgoCFLAGS    []string // cgo: flags for C compiler
811 //         CgoCPPFLAGS  []string // cgo: flags for C preprocessor
812 //         CgoCXXFLAGS  []string // cgo: flags for C++ compiler
813 //         CgoFFLAGS    []string // cgo: flags for Fortran compiler
814 //         CgoLDFLAGS   []string // cgo: flags for linker
815 //         CgoPkgConfig []string // cgo: pkg-config names
816 //
817 //         // Dependency information
818 //         Imports      []string          // import paths used by this package
819 //         ImportMap    map[string]string // map from source import to ImportPath (identity entries omitted)
820 //         Deps         []string          // all (recursively) imported dependencies
821 //         TestImports  []string          // imports from TestGoFiles
822 //         XTestImports []string          // imports from XTestGoFiles
823 //
824 //         // Error information
825 //         Incomplete bool            // this package or a dependency has an error
826 //         Error      *PackageError   // error loading package
827 //         DepsErrors []*PackageError // errors loading dependencies
828 //     }
829 //
830 // Packages stored in vendor directories report an ImportPath that includes the
831 // path to the vendor directory (for example, "d/vendor/p" instead of "p"),
832 // so that the ImportPath uniquely identifies a given copy of a package.
833 // The Imports, Deps, TestImports, and XTestImports lists also contain these
834 // expanded import paths. See golang.org/s/go15vendor for more about vendoring.
835 //
836 // The error information, if any, is
837 //
838 //     type PackageError struct {
839 //         ImportStack   []string // shortest path from package named on command line to this one
840 //         Pos           string   // position of error (if present, file:line:col)
841 //         Err           string   // the error itself
842 //     }
843 //
844 // The module information is a Module struct, defined in the discussion
845 // of list -m below.
846 //
847 // The template function "join" calls strings.Join.
848 //
849 // The template function "context" returns the build context, defined as:
850 //
851 //     type Context struct {
852 //         GOARCH        string   // target architecture
853 //         GOOS          string   // target operating system
854 //         GOROOT        string   // Go root
855 //         GOPATH        string   // Go path
856 //         CgoEnabled    bool     // whether cgo can be used
857 //         UseAllFiles   bool     // use files regardless of +build lines, file names
858 //         Compiler      string   // compiler to assume when computing target paths
859 //         BuildTags     []string // build constraints to match in +build lines
860 //         ToolTags      []string // toolchain-specific build constraints
861 //         ReleaseTags   []string // releases the current release is compatible with
862 //         InstallSuffix string   // suffix to use in the name of the install dir
863 //     }
864 //
865 // For more information about the meaning of these fields see the documentation
866 // for the go/build package's Context type.
867 //
868 // The -json flag causes the package data to be printed in JSON format
869 // instead of using the template format.
870 //
871 // The -compiled flag causes list to set CompiledGoFiles to the Go source
872 // files presented to the compiler. Typically this means that it repeats
873 // the files listed in GoFiles and then also adds the Go code generated
874 // by processing CgoFiles and SwigFiles. The Imports list contains the
875 // union of all imports from both GoFiles and CompiledGoFiles.
876 //
877 // The -deps flag causes list to iterate over not just the named packages
878 // but also all their dependencies. It visits them in a depth-first post-order
879 // traversal, so that a package is listed only after all its dependencies.
880 // Packages not explicitly listed on the command line will have the DepOnly
881 // field set to true.
882 //
883 // The -e flag changes the handling of erroneous packages, those that
884 // cannot be found or are malformed. By default, the list command
885 // prints an error to standard error for each erroneous package and
886 // omits the packages from consideration during the usual printing.
887 // With the -e flag, the list command never prints errors to standard
888 // error and instead processes the erroneous packages with the usual
889 // printing. Erroneous packages will have a non-empty ImportPath and
890 // a non-nil Error field; other information may or may not be missing
891 // (zeroed).
892 //
893 // The -export flag causes list to set the Export field to the name of a
894 // file containing up-to-date export information for the given package.
895 //
896 // The -find flag causes list to identify the named packages but not
897 // resolve their dependencies: the Imports and Deps lists will be empty.
898 //
899 // The -test flag causes list to report not only the named packages
900 // but also their test binaries (for packages with tests), to convey to
901 // source code analysis tools exactly how test binaries are constructed.
902 // The reported import path for a test binary is the import path of
903 // the package followed by a ".test" suffix, as in "math/rand.test".
904 // When building a test, it is sometimes necessary to rebuild certain
905 // dependencies specially for that test (most commonly the tested
906 // package itself). The reported import path of a package recompiled
907 // for a particular test binary is followed by a space and the name of
908 // the test binary in brackets, as in "math/rand [math/rand.test]"
909 // or "regexp [sort.test]". The ForTest field is also set to the name
910 // of the package being tested ("math/rand" or "sort" in the previous
911 // examples).
912 //
913 // The Dir, Target, Shlib, Root, ConflictDir, and Export file paths
914 // are all absolute paths.
915 //
916 // By default, the lists GoFiles, CgoFiles, and so on hold names of files in Dir
917 // (that is, paths relative to Dir, not absolute paths).
918 // The generated files added when using the -compiled and -test flags
919 // are absolute paths referring to cached copies of generated Go source files.
920 // Although they are Go source files, the paths may not end in ".go".
921 //
922 // The -m flag causes list to list modules instead of packages.
923 //
924 // When listing modules, the -f flag still specifies a format template
925 // applied to a Go struct, but now a Module struct:
926 //
927 //     type Module struct {
928 //         Path      string       // module path
929 //         Version   string       // module version
930 //         Versions  []string     // available module versions (with -versions)
931 //         Replace   *Module      // replaced by this module
932 //         Time      *time.Time   // time version was created
933 //         Update    *Module      // available update, if any (with -u)
934 //         Main      bool         // is this the main module?
935 //         Indirect  bool         // is this module only an indirect dependency of main module?
936 //         Dir       string       // directory holding files for this module, if any
937 //         GoMod     string       // path to go.mod file used when loading this module, if any
938 //         GoVersion string       // go version used in module
939 //         Retracted string       // retraction information, if any (with -retracted or -u)
940 //         Error     *ModuleError // error loading module
941 //     }
942 //
943 //     type ModuleError struct {
944 //         Err string // the error itself
945 //     }
946 //
947 // The file GoMod refers to may be outside the module directory if the
948 // module is in the module cache or if the -modfile flag is used.
949 //
950 // The default output is to print the module path and then
951 // information about the version and replacement if any.
952 // For example, 'go list -m all' might print:
953 //
954 //     my/main/module
955 //     golang.org/x/text v0.3.0 => /tmp/text
956 //     rsc.io/pdf v0.1.1
957 //
958 // The Module struct has a String method that formats this
959 // line of output, so that the default format is equivalent
960 // to -f '{{.String}}'.
961 //
962 // Note that when a module has been replaced, its Replace field
963 // describes the replacement module, and its Dir field is set to
964 // the replacement's source code, if present. (That is, if Replace
965 // is non-nil, then Dir is set to Replace.Dir, with no access to
966 // the replaced source code.)
967 //
968 // The -u flag adds information about available upgrades.
969 // When the latest version of a given module is newer than
970 // the current one, list -u sets the Module's Update field
971 // to information about the newer module. list -u will also set
972 // the module's Retracted field if the current version is retracted.
973 // The Module's String method indicates an available upgrade by
974 // formatting the newer version in brackets after the current version.
975 // If a version is retracted, the string "(retracted)" will follow it.
976 // For example, 'go list -m -u all' might print:
977 //
978 //     my/main/module
979 //     golang.org/x/text v0.3.0 [v0.4.0] => /tmp/text
980 //     rsc.io/pdf v0.1.1 (retracted) [v0.1.2]
981 //
982 // (For tools, 'go list -m -u -json all' may be more convenient to parse.)
983 //
984 // The -versions flag causes list to set the Module's Versions field
985 // to a list of all known versions of that module, ordered according
986 // to semantic versioning, earliest to latest. The flag also changes
987 // the default output format to display the module path followed by the
988 // space-separated version list.
989 //
990 // The -retracted flag causes list to report information about retracted
991 // module versions. When -retracted is used with -f or -json, the Retracted
992 // field will be set to a string explaining why the version was retracted.
993 // The string is taken from comments on the retract directive in the
994 // module's go.mod file. When -retracted is used with -versions, retracted
995 // versions are listed together with unretracted versions. The -retracted
996 // flag may be used with or without -m.
997 //
998 // The arguments to list -m are interpreted as a list of modules, not packages.
999 // The main module is the module containing the current directory.
1000 // The active modules are the main module and its dependencies.
1001 // With no arguments, list -m shows the main module.
1002 // With arguments, list -m shows the modules specified by the arguments.
1003 // Any of the active modules can be specified by its module path.
1004 // The special pattern "all" specifies all the active modules, first the main
1005 // module and then dependencies sorted by module path.
1006 // A pattern containing "..." specifies the active modules whose
1007 // module paths match the pattern.
1008 // A query of the form path@version specifies the result of that query,
1009 // which is not limited to active modules.
1010 // See 'go help modules' for more about module queries.
1011 //
1012 // The template function "module" takes a single string argument
1013 // that must be a module path or query and returns the specified
1014 // module as a Module struct. If an error occurs, the result will
1015 // be a Module struct with a non-nil Error field.
1016 //
1017 // For more about build flags, see 'go help build'.
1018 //
1019 // For more about specifying packages, see 'go help packages'.
1020 //
1021 // For more about modules, see https://golang.org/ref/mod.
1022 //
1023 //
1024 // Module maintenance
1025 //
1026 // Go mod provides access to operations on modules.
1027 //
1028 // Note that support for modules is built into all the go commands,
1029 // not just 'go mod'. For example, day-to-day adding, removing, upgrading,
1030 // and downgrading of dependencies should be done using 'go get'.
1031 // See 'go help modules' for an overview of module functionality.
1032 //
1033 // Usage:
1034 //
1035 //      go mod <command> [arguments]
1036 //
1037 // The commands are:
1038 //
1039 //      download    download modules to local cache
1040 //      edit        edit go.mod from tools or scripts
1041 //      editwork    edit go.work from tools or scripts
1042 //      graph       print module requirement graph
1043 //      init        initialize new module in current directory
1044 //      initwork    initialize workspace file
1045 //      tidy        add missing and remove unused modules
1046 //      vendor      make vendored copy of dependencies
1047 //      verify      verify dependencies have expected content
1048 //      why         explain why packages or modules are needed
1049 //
1050 // Use "go help mod <command>" for more information about a command.
1051 //
1052 // Download modules to local cache
1053 //
1054 // Usage:
1055 //
1056 //      go mod download [-x] [-json] [modules]
1057 //
1058 // Download downloads the named modules, which can be module patterns selecting
1059 // dependencies of the main module or module queries of the form path@version.
1060 // With no arguments, download applies to all dependencies of the main module
1061 // (equivalent to 'go mod download all').
1062 //
1063 // The go command will automatically download modules as needed during ordinary
1064 // execution. The "go mod download" command is useful mainly for pre-filling
1065 // the local cache or to compute the answers for a Go module proxy.
1066 //
1067 // By default, download writes nothing to standard output. It may print progress
1068 // messages and errors to standard error.
1069 //
1070 // The -json flag causes download to print a sequence of JSON objects
1071 // to standard output, describing each downloaded module (or failure),
1072 // corresponding to this Go struct:
1073 //
1074 //     type Module struct {
1075 //         Path     string // module path
1076 //         Version  string // module version
1077 //         Error    string // error loading module
1078 //         Info     string // absolute path to cached .info file
1079 //         GoMod    string // absolute path to cached .mod file
1080 //         Zip      string // absolute path to cached .zip file
1081 //         Dir      string // absolute path to cached source root directory
1082 //         Sum      string // checksum for path, version (as in go.sum)
1083 //         GoModSum string // checksum for go.mod (as in go.sum)
1084 //     }
1085 //
1086 // The -x flag causes download to print the commands download executes.
1087 //
1088 // See https://golang.org/ref/mod#go-mod-download for more about 'go mod download'.
1089 //
1090 // See https://golang.org/ref/mod#version-queries for more about version queries.
1091 //
1092 //
1093 // Edit go.mod from tools or scripts
1094 //
1095 // Usage:
1096 //
1097 //      go mod edit [editing flags] [-fmt|-print|-json] [go.mod]
1098 //
1099 // Edit provides a command-line interface for editing go.mod,
1100 // for use primarily by tools or scripts. It reads only go.mod;
1101 // it does not look up information about the modules involved.
1102 // By default, edit reads and writes the go.mod file of the main module,
1103 // but a different target file can be specified after the editing flags.
1104 //
1105 // The editing flags specify a sequence of editing operations.
1106 //
1107 // The -fmt flag reformats the go.mod file without making other changes.
1108 // This reformatting is also implied by any other modifications that use or
1109 // rewrite the go.mod file. The only time this flag is needed is if no other
1110 // flags are specified, as in 'go mod edit -fmt'.
1111 //
1112 // The -module flag changes the module's path (the go.mod file's module line).
1113 //
1114 // The -require=path@version and -droprequire=path flags
1115 // add and drop a requirement on the given module path and version.
1116 // Note that -require overrides any existing requirements on path.
1117 // These flags are mainly for tools that understand the module graph.
1118 // Users should prefer 'go get path@version' or 'go get path@none',
1119 // which make other go.mod adjustments as needed to satisfy
1120 // constraints imposed by other modules.
1121 //
1122 // The -exclude=path@version and -dropexclude=path@version flags
1123 // add and drop an exclusion for the given module path and version.
1124 // Note that -exclude=path@version is a no-op if that exclusion already exists.
1125 //
1126 // The -replace=old[@v]=new[@v] flag adds a replacement of the given
1127 // module path and version pair. If the @v in old@v is omitted, a
1128 // replacement without a version on the left side is added, which applies
1129 // to all versions of the old module path. If the @v in new@v is omitted,
1130 // the new path should be a local module root directory, not a module
1131 // path. Note that -replace overrides any redundant replacements for old[@v],
1132 // so omitting @v will drop existing replacements for specific versions.
1133 //
1134 // The -dropreplace=old[@v] flag drops a replacement of the given
1135 // module path and version pair. If the @v is omitted, a replacement without
1136 // a version on the left side is dropped.
1137 //
1138 // The -retract=version and -dropretract=version flags add and drop a
1139 // retraction on the given version. The version may be a single version
1140 // like "v1.2.3" or a closed interval like "[v1.1.0,v1.1.9]". Note that
1141 // -retract=version is a no-op if that retraction already exists.
1142 //
1143 // The -require, -droprequire, -exclude, -dropexclude, -replace,
1144 // -dropreplace, -retract, and -dropretract editing flags may be repeated,
1145 // and the changes are applied in the order given.
1146 //
1147 // The -go=version flag sets the expected Go language version.
1148 //
1149 // The -print flag prints the final go.mod in its text format instead of
1150 // writing it back to go.mod.
1151 //
1152 // The -json flag prints the final go.mod file in JSON format instead of
1153 // writing it back to go.mod. The JSON output corresponds to these Go types:
1154 //
1155 //      type Module struct {
1156 //              Path    string
1157 //              Version string
1158 //      }
1159 //
1160 //      type GoMod struct {
1161 //              Module  ModPath
1162 //              Go      string
1163 //              Require []Require
1164 //              Exclude []Module
1165 //              Replace []Replace
1166 //              Retract []Retract
1167 //      }
1168 //
1169 //      type ModPath struct {
1170 //              Path       string
1171 //              Deprecated string
1172 //      }
1173 //
1174 //      type Require struct {
1175 //              Path string
1176 //              Version string
1177 //              Indirect bool
1178 //      }
1179 //
1180 //      type Replace struct {
1181 //              Old Module
1182 //              New Module
1183 //      }
1184 //
1185 //      type Retract struct {
1186 //              Low       string
1187 //              High      string
1188 //              Rationale string
1189 //      }
1190 //
1191 // Retract entries representing a single version (not an interval) will have
1192 // the "Low" and "High" fields set to the same value.
1193 //
1194 // Note that this only describes the go.mod file itself, not other modules
1195 // referred to indirectly. For the full set of modules available to a build,
1196 // use 'go list -m -json all'.
1197 //
1198 // See https://golang.org/ref/mod#go-mod-edit for more about 'go mod edit'.
1199 //
1200 //
1201 // Edit go.work from tools or scripts
1202 //
1203 // Usage:
1204 //
1205 //      go mod editwork [editing flags] [go.work]
1206 //
1207 // Editwork provides a command-line interface for editing go.work,
1208 // for use primarily by tools or scripts. It only reads go.work;
1209 // it does not look up information about the modules involved.
1210 // If no file is specified, editwork looks for a go.work file in the current
1211 // directory and its parent directories
1212 //
1213 // The editing flags specify a sequence of editing operations.
1214 //
1215 // The -fmt flag reformats the go.work file without making other changes.
1216 // This reformatting is also implied by any other modifications that use or
1217 // rewrite the go.mod file. The only time this flag is needed is if no other
1218 // flags are specified, as in 'go mod editwork -fmt'.
1219 //
1220 // The -directory=path and -dropdirectory=path flags
1221 // add and drop a directory from the go.work files set of module directories.
1222 //
1223 // The -replace=old[@v]=new[@v] flag adds a replacement of the given
1224 // module path and version pair. If the @v in old@v is omitted, a
1225 // replacement without a version on the left side is added, which applies
1226 // to all versions of the old module path. If the @v in new@v is omitted,
1227 // the new path should be a local module root directory, not a module
1228 // path. Note that -replace overrides any redundant replacements for old[@v],
1229 // so omitting @v will drop existing replacements for specific versions.
1230 //
1231 // The -dropreplace=old[@v] flag drops a replacement of the given
1232 // module path and version pair. If the @v is omitted, a replacement without
1233 // a version on the left side is dropped.
1234 //
1235 // The -directory, -dropdirectory, -replace, and -dropreplace,
1236 // editing flags may be repeated, and the changes are applied in the order given.
1237 //
1238 // The -go=version flag sets the expected Go language version.
1239 //
1240 // The -print flag prints the final go.work in its text format instead of
1241 // writing it back to go.mod.
1242 //
1243 // The -json flag prints the final go.work file in JSON format instead of
1244 // writing it back to go.mod. The JSON output corresponds to these Go types:
1245 //
1246 //      type Module struct {
1247 //              Path    string
1248 //              Version string
1249 //      }
1250 //
1251 //      type GoWork struct {
1252 //              Go        string
1253 //              Directory []Directory
1254 //              Replace   []Replace
1255 //      }
1256 //
1257 //      type Directory struct {
1258 //              Path       string
1259 //              ModulePath string
1260 //      }
1261 //
1262 //      type Replace struct {
1263 //              Old Module
1264 //              New Module
1265 //      }
1266 //
1267 // See the workspaces design proposal at
1268 // https://go.googlesource.com/proposal/+/master/design/45713-workspace.md for
1269 // more information.
1270 //
1271 //
1272 // Print module requirement graph
1273 //
1274 // Usage:
1275 //
1276 //      go mod graph [-go=version]
1277 //
1278 // Graph prints the module requirement graph (with replacements applied)
1279 // in text form. Each line in the output has two space-separated fields: a module
1280 // and one of its requirements. Each module is identified as a string of the form
1281 // path@version, except for the main module, which has no @version suffix.
1282 //
1283 // The -go flag causes graph to report the module graph as loaded by the
1284 // given Go version, instead of the version indicated by the 'go' directive
1285 // in the go.mod file.
1286 //
1287 // See https://golang.org/ref/mod#go-mod-graph for more about 'go mod graph'.
1288 //
1289 //
1290 // Initialize new module in current directory
1291 //
1292 // Usage:
1293 //
1294 //      go mod init [module-path]
1295 //
1296 // Init initializes and writes a new go.mod file in the current directory, in
1297 // effect creating a new module rooted at the current directory. The go.mod file
1298 // must not already exist.
1299 //
1300 // Init accepts one optional argument, the module path for the new module. If the
1301 // module path argument is omitted, init will attempt to infer the module path
1302 // using import comments in .go files, vendoring tool configuration files (like
1303 // Gopkg.lock), and the current directory (if in GOPATH).
1304 //
1305 // If a configuration file for a vendoring tool is present, init will attempt to
1306 // import module requirements from it.
1307 //
1308 // See https://golang.org/ref/mod#go-mod-init for more about 'go mod init'.
1309 //
1310 //
1311 // Initialize workspace file
1312 //
1313 // Usage:
1314 //
1315 //      go mod initwork [moddirs]
1316 //
1317 // go mod initwork initializes and writes a new go.work file in the current
1318 // directory, in effect creating a new workspace at the current directory.
1319 //
1320 // go mod initwork optionally accepts paths to the workspace modules as arguments.
1321 // If the argument is omitted, an empty workspace with no modules will be created.
1322 //
1323 // See the workspaces design proposal at
1324 // https://go.googlesource.com/proposal/+/master/design/45713-workspace.md for
1325 // more information.
1326 //
1327 //
1328 // Add missing and remove unused modules
1329 //
1330 // Usage:
1331 //
1332 //      go mod tidy [-e] [-v] [-go=version] [-compat=version]
1333 //
1334 // Tidy makes sure go.mod matches the source code in the module.
1335 // It adds any missing modules necessary to build the current module's
1336 // packages and dependencies, and it removes unused modules that
1337 // don't provide any relevant packages. It also adds any missing entries
1338 // to go.sum and removes any unnecessary ones.
1339 //
1340 // The -v flag causes tidy to print information about removed modules
1341 // to standard error.
1342 //
1343 // The -e flag causes tidy to attempt to proceed despite errors
1344 // encountered while loading packages.
1345 //
1346 // The -go flag causes tidy to update the 'go' directive in the go.mod
1347 // file to the given version, which may change which module dependencies
1348 // are retained as explicit requirements in the go.mod file.
1349 // (Go versions 1.17 and higher retain more requirements in order to
1350 // support lazy module loading.)
1351 //
1352 // The -compat flag preserves any additional checksums needed for the
1353 // 'go' command from the indicated major Go release to successfully load
1354 // the module graph, and causes tidy to error out if that version of the
1355 // 'go' command would load any imported package from a different module
1356 // version. By default, tidy acts as if the -compat flag were set to the
1357 // version prior to the one indicated by the 'go' directive in the go.mod
1358 // file.
1359 //
1360 // See https://golang.org/ref/mod#go-mod-tidy for more about 'go mod tidy'.
1361 //
1362 //
1363 // Make vendored copy of dependencies
1364 //
1365 // Usage:
1366 //
1367 //      go mod vendor [-e] [-v]
1368 //
1369 // Vendor resets the main module's vendor directory to include all packages
1370 // needed to build and test all the main module's packages.
1371 // It does not include test code for vendored packages.
1372 //
1373 // The -v flag causes vendor to print the names of vendored
1374 // modules and packages to standard error.
1375 //
1376 // The -e flag causes vendor to attempt to proceed despite errors
1377 // encountered while loading packages.
1378 //
1379 // See https://golang.org/ref/mod#go-mod-vendor for more about 'go mod vendor'.
1380 //
1381 //
1382 // Verify dependencies have expected content
1383 //
1384 // Usage:
1385 //
1386 //      go mod verify
1387 //
1388 // Verify checks that the dependencies of the current module,
1389 // which are stored in a local downloaded source cache, have not been
1390 // modified since being downloaded. If all the modules are unmodified,
1391 // verify prints "all modules verified." Otherwise it reports which
1392 // modules have been changed and causes 'go mod' to exit with a
1393 // non-zero status.
1394 //
1395 // See https://golang.org/ref/mod#go-mod-verify for more about 'go mod verify'.
1396 //
1397 //
1398 // Explain why packages or modules are needed
1399 //
1400 // Usage:
1401 //
1402 //      go mod why [-m] [-vendor] packages...
1403 //
1404 // Why shows a shortest path in the import graph from the main module to
1405 // each of the listed packages. If the -m flag is given, why treats the
1406 // arguments as a list of modules and finds a path to any package in each
1407 // of the modules.
1408 //
1409 // By default, why queries the graph of packages matched by "go list all",
1410 // which includes tests for reachable packages. The -vendor flag causes why
1411 // to exclude tests of dependencies.
1412 //
1413 // The output is a sequence of stanzas, one for each package or module
1414 // name on the command line, separated by blank lines. Each stanza begins
1415 // with a comment line "# package" or "# module" giving the target
1416 // package or module. Subsequent lines give a path through the import
1417 // graph, one package per line. If the package or module is not
1418 // referenced from the main module, the stanza will display a single
1419 // parenthesized note indicating that fact.
1420 //
1421 // For example:
1422 //
1423 //      $ go mod why golang.org/x/text/language golang.org/x/text/encoding
1424 //      # golang.org/x/text/language
1425 //      rsc.io/quote
1426 //      rsc.io/sampler
1427 //      golang.org/x/text/language
1428 //
1429 //      # golang.org/x/text/encoding
1430 //      (main module does not need package golang.org/x/text/encoding)
1431 //      $
1432 //
1433 // See https://golang.org/ref/mod#go-mod-why for more about 'go mod why'.
1434 //
1435 //
1436 // Compile and run Go program
1437 //
1438 // Usage:
1439 //
1440 //      go run [build flags] [-exec xprog] package [arguments...]
1441 //
1442 // Run compiles and runs the named main Go package.
1443 // Typically the package is specified as a list of .go source files from a single
1444 // directory, but it may also be an import path, file system path, or pattern
1445 // matching a single known package, as in 'go run .' or 'go run my/cmd'.
1446 //
1447 // If the package argument has a version suffix (like @latest or @v1.0.0),
1448 // "go run" builds the program in module-aware mode, ignoring the go.mod file in
1449 // the current directory or any parent directory, if there is one. This is useful
1450 // for running programs without affecting the dependencies of the main module.
1451 //
1452 // If the package argument doesn't have a version suffix, "go run" may run in
1453 // module-aware mode or GOPATH mode, depending on the GO111MODULE environment
1454 // variable and the presence of a go.mod file. See 'go help modules' for details.
1455 // If module-aware mode is enabled, "go run" runs in the context of the main
1456 // module.
1457 //
1458 // By default, 'go run' runs the compiled binary directly: 'a.out arguments...'.
1459 // If the -exec flag is given, 'go run' invokes the binary using xprog:
1460 //      'xprog a.out arguments...'.
1461 // If the -exec flag is not given, GOOS or GOARCH is different from the system
1462 // default, and a program named go_$GOOS_$GOARCH_exec can be found
1463 // on the current search path, 'go run' invokes the binary using that program,
1464 // for example 'go_js_wasm_exec a.out arguments...'. This allows execution of
1465 // cross-compiled programs when a simulator or other execution method is
1466 // available.
1467 //
1468 // The exit status of Run is not the exit status of the compiled binary.
1469 //
1470 // For more about build flags, see 'go help build'.
1471 // For more about specifying packages, see 'go help packages'.
1472 //
1473 // See also: go build.
1474 //
1475 //
1476 // Test packages
1477 //
1478 // Usage:
1479 //
1480 //      go test [build/test flags] [packages] [build/test flags & test binary flags]
1481 //
1482 // 'Go test' automates testing the packages named by the import paths.
1483 // It prints a summary of the test results in the format:
1484 //
1485 //      ok   archive/tar   0.011s
1486 //      FAIL archive/zip   0.022s
1487 //      ok   compress/gzip 0.033s
1488 //      ...
1489 //
1490 // followed by detailed output for each failed package.
1491 //
1492 // 'Go test' recompiles each package along with any files with names matching
1493 // the file pattern "*_test.go".
1494 // These additional files can contain test functions, benchmark functions, fuzz
1495 // targets and example functions. See 'go help testfunc' for more.
1496 // Each listed package causes the execution of a separate test binary.
1497 // Files whose names begin with "_" (including "_test.go") or "." are ignored.
1498 //
1499 // Test files that declare a package with the suffix "_test" will be compiled as a
1500 // separate package, and then linked and run with the main test binary.
1501 //
1502 // The go tool will ignore a directory named "testdata", making it available
1503 // to hold ancillary data needed by the tests.
1504 //
1505 // As part of building a test binary, go test runs go vet on the package
1506 // and its test source files to identify significant problems. If go vet
1507 // finds any problems, go test reports those and does not run the test
1508 // binary. Only a high-confidence subset of the default go vet checks are
1509 // used. That subset is: 'atomic', 'bool', 'buildtags', 'errorsas',
1510 // 'ifaceassert', 'nilfunc', 'printf', and 'stringintconv'. You can see
1511 // the documentation for these and other vet tests via "go doc cmd/vet".
1512 // To disable the running of go vet, use the -vet=off flag. To run all
1513 // checks, use the -vet=all flag.
1514 //
1515 // All test output and summary lines are printed to the go command's
1516 // standard output, even if the test printed them to its own standard
1517 // error. (The go command's standard error is reserved for printing
1518 // errors building the tests.)
1519 //
1520 // Go test runs in two different modes:
1521 //
1522 // The first, called local directory mode, occurs when go test is
1523 // invoked with no package arguments (for example, 'go test' or 'go
1524 // test -v'). In this mode, go test compiles the package sources and
1525 // tests found in the current directory and then runs the resulting
1526 // test binary. In this mode, caching (discussed below) is disabled.
1527 // After the package test finishes, go test prints a summary line
1528 // showing the test status ('ok' or 'FAIL'), package name, and elapsed
1529 // time.
1530 //
1531 // The second, called package list mode, occurs when go test is invoked
1532 // with explicit package arguments (for example 'go test math', 'go
1533 // test ./...', and even 'go test .'). In this mode, go test compiles
1534 // and tests each of the packages listed on the command line. If a
1535 // package test passes, go test prints only the final 'ok' summary
1536 // line. If a package test fails, go test prints the full test output.
1537 // If invoked with the -bench or -v flag, go test prints the full
1538 // output even for passing package tests, in order to display the
1539 // requested benchmark results or verbose logging. After the package
1540 // tests for all of the listed packages finish, and their output is
1541 // printed, go test prints a final 'FAIL' status if any package test
1542 // has failed.
1543 //
1544 // In package list mode only, go test caches successful package test
1545 // results to avoid unnecessary repeated running of tests. When the
1546 // result of a test can be recovered from the cache, go test will
1547 // redisplay the previous output instead of running the test binary
1548 // again. When this happens, go test prints '(cached)' in place of the
1549 // elapsed time in the summary line.
1550 //
1551 // The rule for a match in the cache is that the run involves the same
1552 // test binary and the flags on the command line come entirely from a
1553 // restricted set of 'cacheable' test flags, defined as -benchtime, -cpu,
1554 // -list, -parallel, -run, -short, -timeout, -failfast, and -v.
1555 // If a run of go test has any test or non-test flags outside this set,
1556 // the result is not cached. To disable test caching, use any test flag
1557 // or argument other than the cacheable flags. The idiomatic way to disable
1558 // test caching explicitly is to use -count=1. Tests that open files within
1559 // the package's source root (usually $GOPATH) or that consult environment
1560 // variables only match future runs in which the files and environment
1561 // variables are unchanged. A cached test result is treated as executing
1562 // in no time at all,so a successful package test result will be cached and
1563 // reused regardless of -timeout setting.
1564 //
1565 // Run 'go help fuzz' for details around how the go command handles fuzz targets.
1566 //
1567 // In addition to the build flags, the flags handled by 'go test' itself are:
1568 //
1569 //      -args
1570 //          Pass the remainder of the command line (everything after -args)
1571 //          to the test binary, uninterpreted and unchanged.
1572 //          Because this flag consumes the remainder of the command line,
1573 //          the package list (if present) must appear before this flag.
1574 //
1575 //      -c
1576 //          Compile the test binary to pkg.test but do not run it
1577 //          (where pkg is the last element of the package's import path).
1578 //          The file name can be changed with the -o flag.
1579 //
1580 //      -exec xprog
1581 //          Run the test binary using xprog. The behavior is the same as
1582 //          in 'go run'. See 'go help run' for details.
1583 //
1584 //      -i
1585 //          Install packages that are dependencies of the test.
1586 //          Do not run the test.
1587 //          The -i flag is deprecated. Compiled packages are cached automatically.
1588 //
1589 //      -json
1590 //          Convert test output to JSON suitable for automated processing.
1591 //          See 'go doc test2json' for the encoding details.
1592 //
1593 //      -o file
1594 //          Compile the test binary to the named file.
1595 //          The test still runs (unless -c or -i is specified).
1596 //
1597 // The test binary also accepts flags that control execution of the test; these
1598 // flags are also accessible by 'go test'. See 'go help testflag' for details.
1599 //
1600 // For more about build flags, see 'go help build'.
1601 // For more about specifying packages, see 'go help packages'.
1602 //
1603 // See also: go build, go vet.
1604 //
1605 //
1606 // Run specified go tool
1607 //
1608 // Usage:
1609 //
1610 //      go tool [-n] command [args...]
1611 //
1612 // Tool runs the go tool command identified by the arguments.
1613 // With no arguments it prints the list of known tools.
1614 //
1615 // The -n flag causes tool to print the command that would be
1616 // executed but not execute it.
1617 //
1618 // For more about each tool command, see 'go doc cmd/<command>'.
1619 //
1620 //
1621 // Print Go version
1622 //
1623 // Usage:
1624 //
1625 //      go version [-m] [-v] [file ...]
1626 //
1627 // Version prints the build information for Go executables.
1628 //
1629 // Go version reports the Go version used to build each of the named
1630 // executable files.
1631 //
1632 // If no files are named on the command line, go version prints its own
1633 // version information.
1634 //
1635 // If a directory is named, go version walks that directory, recursively,
1636 // looking for recognized Go binaries and reporting their versions.
1637 // By default, go version does not report unrecognized files found
1638 // during a directory scan. The -v flag causes it to report unrecognized files.
1639 //
1640 // The -m flag causes go version to print each executable's embedded
1641 // module version information, when available. In the output, the module
1642 // information consists of multiple lines following the version line, each
1643 // indented by a leading tab character.
1644 //
1645 // See also: go doc runtime/debug.BuildInfo.
1646 //
1647 //
1648 // Report likely mistakes in packages
1649 //
1650 // Usage:
1651 //
1652 //      go vet [-n] [-x] [-vettool prog] [build flags] [vet flags] [packages]
1653 //
1654 // Vet runs the Go vet command on the packages named by the import paths.
1655 //
1656 // For more about vet and its flags, see 'go doc cmd/vet'.
1657 // For more about specifying packages, see 'go help packages'.
1658 // For a list of checkers and their flags, see 'go tool vet help'.
1659 // For details of a specific checker such as 'printf', see 'go tool vet help printf'.
1660 //
1661 // The -n flag prints commands that would be executed.
1662 // The -x flag prints commands as they are executed.
1663 //
1664 // The -vettool=prog flag selects a different analysis tool with alternative
1665 // or additional checks.
1666 // For example, the 'shadow' analyzer can be built and run using these commands:
1667 //
1668 //   go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
1669 //   go vet -vettool=$(which shadow)
1670 //
1671 // The build flags supported by go vet are those that control package resolution
1672 // and execution, such as -n, -x, -v, -tags, and -toolexec.
1673 // For more about these flags, see 'go help build'.
1674 //
1675 // See also: go fmt, go fix.
1676 //
1677 //
1678 // Build constraints
1679 //
1680 // A build constraint, also known as a build tag, is a line comment that begins
1681 //
1682 //      //go:build
1683 //
1684 // that lists the conditions under which a file should be included in the package.
1685 // Constraints may appear in any kind of source file (not just Go), but
1686 // they must appear near the top of the file, preceded
1687 // only by blank lines and other line comments. These rules mean that in Go
1688 // files a build constraint must appear before the package clause.
1689 //
1690 // To distinguish build constraints from package documentation,
1691 // a build constraint should be followed by a blank line.
1692 //
1693 // A build constraint is evaluated as an expression containing options
1694 // combined by ||, &&, and ! operators and parentheses. Operators have
1695 // the same meaning as in Go.
1696 //
1697 // For example, the following build constraint constrains a file to
1698 // build when the "linux" and "386" constraints are satisfied, or when
1699 // "darwin" is satisfied and "cgo" is not:
1700 //
1701 //      //go:build (linux && 386) || (darwin && !cgo)
1702 //
1703 // It is an error for a file to have more than one //go:build line.
1704 //
1705 // During a particular build, the following words are satisfied:
1706 //
1707 //      - the target operating system, as spelled by runtime.GOOS, set with the
1708 //        GOOS environment variable.
1709 //      - the target architecture, as spelled by runtime.GOARCH, set with the
1710 //        GOARCH environment variable.
1711 //      - the compiler being used, either "gc" or "gccgo"
1712 //      - "cgo", if the cgo command is supported (see CGO_ENABLED in
1713 //        'go help environment').
1714 //      - a term for each Go major release, through the current version:
1715 //        "go1.1" from Go version 1.1 onward, "go1.12" from Go 1.12, and so on.
1716 //      - any additional tags given by the -tags flag (see 'go help build').
1717 //
1718 // There are no separate build tags for beta or minor releases.
1719 //
1720 // If a file's name, after stripping the extension and a possible _test suffix,
1721 // matches any of the following patterns:
1722 //      *_GOOS
1723 //      *_GOARCH
1724 //      *_GOOS_GOARCH
1725 // (example: source_windows_amd64.go) where GOOS and GOARCH represent
1726 // any known operating system and architecture values respectively, then
1727 // the file is considered to have an implicit build constraint requiring
1728 // those terms (in addition to any explicit constraints in the file).
1729 //
1730 // Using GOOS=android matches build tags and files as for GOOS=linux
1731 // in addition to android tags and files.
1732 //
1733 // Using GOOS=illumos matches build tags and files as for GOOS=solaris
1734 // in addition to illumos tags and files.
1735 //
1736 // Using GOOS=ios matches build tags and files as for GOOS=darwin
1737 // in addition to ios tags and files.
1738 //
1739 // To keep a file from being considered for the build:
1740 //
1741 //      //go:build ignore
1742 //
1743 // (any other unsatisfied word will work as well, but "ignore" is conventional.)
1744 //
1745 // To build a file only when using cgo, and only on Linux and OS X:
1746 //
1747 //      //go:build cgo && (linux || darwin)
1748 //
1749 // Such a file is usually paired with another file implementing the
1750 // default functionality for other systems, which in this case would
1751 // carry the constraint:
1752 //
1753 //      //go:build !(cgo && (linux || darwin))
1754 //
1755 // Naming a file dns_windows.go will cause it to be included only when
1756 // building the package for Windows; similarly, math_386.s will be included
1757 // only when building the package for 32-bit x86.
1758 //
1759 // Go versions 1.16 and earlier used a different syntax for build constraints,
1760 // with a "// +build" prefix. The gofmt command will add an equivalent //go:build
1761 // constraint when encountering the older syntax.
1762 //
1763 //
1764 // Build modes
1765 //
1766 // The 'go build' and 'go install' commands take a -buildmode argument which
1767 // indicates which kind of object file is to be built. Currently supported values
1768 // are:
1769 //
1770 //      -buildmode=archive
1771 //              Build the listed non-main packages into .a files. Packages named
1772 //              main are ignored.
1773 //
1774 //      -buildmode=c-archive
1775 //              Build the listed main package, plus all packages it imports,
1776 //              into a C archive file. The only callable symbols will be those
1777 //              functions exported using a cgo //export comment. Requires
1778 //              exactly one main package to be listed.
1779 //
1780 //      -buildmode=c-shared
1781 //              Build the listed main package, plus all packages it imports,
1782 //              into a C shared library. The only callable symbols will
1783 //              be those functions exported using a cgo //export comment.
1784 //              Requires exactly one main package to be listed.
1785 //
1786 //      -buildmode=default
1787 //              Listed main packages are built into executables and listed
1788 //              non-main packages are built into .a files (the default
1789 //              behavior).
1790 //
1791 //      -buildmode=shared
1792 //              Combine all the listed non-main packages into a single shared
1793 //              library that will be used when building with the -linkshared
1794 //              option. Packages named main are ignored.
1795 //
1796 //      -buildmode=exe
1797 //              Build the listed main packages and everything they import into
1798 //              executables. Packages not named main are ignored.
1799 //
1800 //      -buildmode=pie
1801 //              Build the listed main packages and everything they import into
1802 //              position independent executables (PIE). Packages not named
1803 //              main are ignored.
1804 //
1805 //      -buildmode=plugin
1806 //              Build the listed main packages, plus all packages that they
1807 //              import, into a Go plugin. Packages not named main are ignored.
1808 //
1809 // On AIX, when linking a C program that uses a Go archive built with
1810 // -buildmode=c-archive, you must pass -Wl,-bnoobjreorder to the C compiler.
1811 //
1812 //
1813 // Calling between Go and C
1814 //
1815 // There are two different ways to call between Go and C/C++ code.
1816 //
1817 // The first is the cgo tool, which is part of the Go distribution. For
1818 // information on how to use it see the cgo documentation (go doc cmd/cgo).
1819 //
1820 // The second is the SWIG program, which is a general tool for
1821 // interfacing between languages. For information on SWIG see
1822 // http://swig.org/. When running go build, any file with a .swig
1823 // extension will be passed to SWIG. Any file with a .swigcxx extension
1824 // will be passed to SWIG with the -c++ option.
1825 //
1826 // When either cgo or SWIG is used, go build will pass any .c, .m, .s, .S
1827 // or .sx files to the C compiler, and any .cc, .cpp, .cxx files to the C++
1828 // compiler. The CC or CXX environment variables may be set to determine
1829 // the C or C++ compiler, respectively, to use.
1830 //
1831 //
1832 // Build and test caching
1833 //
1834 // The go command caches build outputs for reuse in future builds.
1835 // The default location for cache data is a subdirectory named go-build
1836 // in the standard user cache directory for the current operating system.
1837 // Setting the GOCACHE environment variable overrides this default,
1838 // and running 'go env GOCACHE' prints the current cache directory.
1839 //
1840 // The go command periodically deletes cached data that has not been
1841 // used recently. Running 'go clean -cache' deletes all cached data.
1842 //
1843 // The build cache correctly accounts for changes to Go source files,
1844 // compilers, compiler options, and so on: cleaning the cache explicitly
1845 // should not be necessary in typical use. However, the build cache
1846 // does not detect changes to C libraries imported with cgo.
1847 // If you have made changes to the C libraries on your system, you
1848 // will need to clean the cache explicitly or else use the -a build flag
1849 // (see 'go help build') to force rebuilding of packages that
1850 // depend on the updated C libraries.
1851 //
1852 // The go command also caches successful package test results.
1853 // See 'go help test' for details. Running 'go clean -testcache' removes
1854 // all cached test results (but not cached build results).
1855 //
1856 // The GODEBUG environment variable can enable printing of debugging
1857 // information about the state of the cache:
1858 //
1859 // GODEBUG=gocacheverify=1 causes the go command to bypass the
1860 // use of any cache entries and instead rebuild everything and check
1861 // that the results match existing cache entries.
1862 //
1863 // GODEBUG=gocachehash=1 causes the go command to print the inputs
1864 // for all of the content hashes it uses to construct cache lookup keys.
1865 // The output is voluminous but can be useful for debugging the cache.
1866 //
1867 // GODEBUG=gocachetest=1 causes the go command to print details of its
1868 // decisions about whether to reuse a cached test result.
1869 //
1870 //
1871 // Environment variables
1872 //
1873 // The go command and the tools it invokes consult environment variables
1874 // for configuration. If an environment variable is unset, the go command
1875 // uses a sensible default setting. To see the effective setting of the
1876 // variable <NAME>, run 'go env <NAME>'. To change the default setting,
1877 // run 'go env -w <NAME>=<VALUE>'. Defaults changed using 'go env -w'
1878 // are recorded in a Go environment configuration file stored in the
1879 // per-user configuration directory, as reported by os.UserConfigDir.
1880 // The location of the configuration file can be changed by setting
1881 // the environment variable GOENV, and 'go env GOENV' prints the
1882 // effective location, but 'go env -w' cannot change the default location.
1883 // See 'go help env' for details.
1884 //
1885 // General-purpose environment variables:
1886 //
1887 //      GO111MODULE
1888 //              Controls whether the go command runs in module-aware mode or GOPATH mode.
1889 //              May be "off", "on", or "auto".
1890 //              See https://golang.org/ref/mod#mod-commands.
1891 //      GCCGO
1892 //              The gccgo command to run for 'go build -compiler=gccgo'.
1893 //      GOARCH
1894 //              The architecture, or processor, for which to compile code.
1895 //              Examples are amd64, 386, arm, ppc64.
1896 //      GOBIN
1897 //              The directory where 'go install' will install a command.
1898 //      GOCACHE
1899 //              The directory where the go command will store cached
1900 //              information for reuse in future builds.
1901 //      GOMODCACHE
1902 //              The directory where the go command will store downloaded modules.
1903 //      GODEBUG
1904 //              Enable various debugging facilities. See 'go doc runtime'
1905 //              for details.
1906 //      GOENV
1907 //              The location of the Go environment configuration file.
1908 //              Cannot be set using 'go env -w'.
1909 //      GOFLAGS
1910 //              A space-separated list of -flag=value settings to apply
1911 //              to go commands by default, when the given flag is known by
1912 //              the current command. Each entry must be a standalone flag.
1913 //              Because the entries are space-separated, flag values must
1914 //              not contain spaces. Flags listed on the command line
1915 //              are applied after this list and therefore override it.
1916 //      GOINSECURE
1917 //              Comma-separated list of glob patterns (in the syntax of Go's path.Match)
1918 //              of module path prefixes that should always be fetched in an insecure
1919 //              manner. Only applies to dependencies that are being fetched directly.
1920 //              GOINSECURE does not disable checksum database validation. GOPRIVATE or
1921 //              GONOSUMDB may be used to achieve that.
1922 //      GOOS
1923 //              The operating system for which to compile code.
1924 //              Examples are linux, darwin, windows, netbsd.
1925 //      GOPATH
1926 //              For more details see: 'go help gopath'.
1927 //      GOPROXY
1928 //              URL of Go module proxy. See https://golang.org/ref/mod#environment-variables
1929 //              and https://golang.org/ref/mod#module-proxy for details.
1930 //      GOPRIVATE, GONOPROXY, GONOSUMDB
1931 //              Comma-separated list of glob patterns (in the syntax of Go's path.Match)
1932 //              of module path prefixes that should always be fetched directly
1933 //              or that should not be compared against the checksum database.
1934 //              See https://golang.org/ref/mod#private-modules.
1935 //      GOROOT
1936 //              The root of the go tree.
1937 //      GOSUMDB
1938 //              The name of checksum database to use and optionally its public key and
1939 //              URL. See https://golang.org/ref/mod#authenticating.
1940 //      GOTMPDIR
1941 //              The directory where the go command will write
1942 //              temporary source files, packages, and binaries.
1943 //      GOVCS
1944 //              Lists version control commands that may be used with matching servers.
1945 //              See 'go help vcs'.
1946 //
1947 // Environment variables for use with cgo:
1948 //
1949 //      AR
1950 //              The command to use to manipulate library archives when
1951 //              building with the gccgo compiler.
1952 //              The default is 'ar'.
1953 //      CC
1954 //              The command to use to compile C code.
1955 //      CGO_ENABLED
1956 //              Whether the cgo command is supported. Either 0 or 1.
1957 //      CGO_CFLAGS
1958 //              Flags that cgo will pass to the compiler when compiling
1959 //              C code.
1960 //      CGO_CFLAGS_ALLOW
1961 //              A regular expression specifying additional flags to allow
1962 //              to appear in #cgo CFLAGS source code directives.
1963 //              Does not apply to the CGO_CFLAGS environment variable.
1964 //      CGO_CFLAGS_DISALLOW
1965 //              A regular expression specifying flags that must be disallowed
1966 //              from appearing in #cgo CFLAGS source code directives.
1967 //              Does not apply to the CGO_CFLAGS environment variable.
1968 //      CGO_CPPFLAGS, CGO_CPPFLAGS_ALLOW, CGO_CPPFLAGS_DISALLOW
1969 //              Like CGO_CFLAGS, CGO_CFLAGS_ALLOW, and CGO_CFLAGS_DISALLOW,
1970 //              but for the C preprocessor.
1971 //      CGO_CXXFLAGS, CGO_CXXFLAGS_ALLOW, CGO_CXXFLAGS_DISALLOW
1972 //              Like CGO_CFLAGS, CGO_CFLAGS_ALLOW, and CGO_CFLAGS_DISALLOW,
1973 //              but for the C++ compiler.
1974 //      CGO_FFLAGS, CGO_FFLAGS_ALLOW, CGO_FFLAGS_DISALLOW
1975 //              Like CGO_CFLAGS, CGO_CFLAGS_ALLOW, and CGO_CFLAGS_DISALLOW,
1976 //              but for the Fortran compiler.
1977 //      CGO_LDFLAGS, CGO_LDFLAGS_ALLOW, CGO_LDFLAGS_DISALLOW
1978 //              Like CGO_CFLAGS, CGO_CFLAGS_ALLOW, and CGO_CFLAGS_DISALLOW,
1979 //              but for the linker.
1980 //      CXX
1981 //              The command to use to compile C++ code.
1982 //      FC
1983 //              The command to use to compile Fortran code.
1984 //      PKG_CONFIG
1985 //              Path to pkg-config tool.
1986 //
1987 // Architecture-specific environment variables:
1988 //
1989 //      GOARM
1990 //              For GOARCH=arm, the ARM architecture for which to compile.
1991 //              Valid values are 5, 6, 7.
1992 //      GO386
1993 //              For GOARCH=386, how to implement floating point instructions.
1994 //              Valid values are sse2 (default), softfloat.
1995 //      GOAMD64
1996 //              For GOARCH=amd64, the microarchitecture level for which to compile.
1997 //              Valid values are v1 (default), v2, v3, v4.
1998 //              See https://en.wikipedia.org/wiki/X86-64#Microarchitecture_levels.
1999 //      GOMIPS
2000 //              For GOARCH=mips{,le}, whether to use floating point instructions.
2001 //              Valid values are hardfloat (default), softfloat.
2002 //      GOMIPS64
2003 //              For GOARCH=mips64{,le}, whether to use floating point instructions.
2004 //              Valid values are hardfloat (default), softfloat.
2005 //      GOPPC64
2006 //              For GOARCH=ppc64{,le}, the target ISA (Instruction Set Architecture).
2007 //              Valid values are power8 (default), power9.
2008 //      GOWASM
2009 //              For GOARCH=wasm, comma-separated list of experimental WebAssembly features to use.
2010 //              Valid values are satconv, signext.
2011 //
2012 // Special-purpose environment variables:
2013 //
2014 //      GCCGOTOOLDIR
2015 //              If set, where to find gccgo tools, such as cgo.
2016 //              The default is based on how gccgo was configured.
2017 //      GOEXPERIMENT
2018 //              Comma-separated list of toolchain experiments to enable or disable.
2019 //              The list of available experiments may change arbitrarily over time.
2020 //              See src/internal/goexperiment/flags.go for currently valid values.
2021 //              Warning: This variable is provided for the development and testing
2022 //              of the Go toolchain itself. Use beyond that purpose is unsupported.
2023 //      GOROOT_FINAL
2024 //              The root of the installed Go tree, when it is
2025 //              installed in a location other than where it is built.
2026 //              File names in stack traces are rewritten from GOROOT to
2027 //              GOROOT_FINAL.
2028 //      GO_EXTLINK_ENABLED
2029 //              Whether the linker should use external linking mode
2030 //              when using -linkmode=auto with code that uses cgo.
2031 //              Set to 0 to disable external linking mode, 1 to enable it.
2032 //      GIT_ALLOW_PROTOCOL
2033 //              Defined by Git. A colon-separated list of schemes that are allowed
2034 //              to be used with git fetch/clone. If set, any scheme not explicitly
2035 //              mentioned will be considered insecure by 'go get'.
2036 //              Because the variable is defined by Git, the default value cannot
2037 //              be set using 'go env -w'.
2038 //
2039 // Additional information available from 'go env' but not read from the environment:
2040 //
2041 //      GOEXE
2042 //              The executable file name suffix (".exe" on Windows, "" on other systems).
2043 //      GOGCCFLAGS
2044 //              A space-separated list of arguments supplied to the CC command.
2045 //      GOHOSTARCH
2046 //              The architecture (GOARCH) of the Go toolchain binaries.
2047 //      GOHOSTOS
2048 //              The operating system (GOOS) of the Go toolchain binaries.
2049 //      GOMOD
2050 //              The absolute path to the go.mod of the main module.
2051 //              If module-aware mode is enabled, but there is no go.mod, GOMOD will be
2052 //              os.DevNull ("/dev/null" on Unix-like systems, "NUL" on Windows).
2053 //              If module-aware mode is disabled, GOMOD will be the empty string.
2054 //      GOTOOLDIR
2055 //              The directory where the go tools (compile, cover, doc, etc...) are installed.
2056 //      GOVERSION
2057 //              The version of the installed Go tree, as reported by runtime.Version.
2058 //
2059 //
2060 // File types
2061 //
2062 // The go command examines the contents of a restricted set of files
2063 // in each directory. It identifies which files to examine based on
2064 // the extension of the file name. These extensions are:
2065 //
2066 //      .go
2067 //              Go source files.
2068 //      .c, .h
2069 //              C source files.
2070 //              If the package uses cgo or SWIG, these will be compiled with the
2071 //              OS-native compiler (typically gcc); otherwise they will
2072 //              trigger an error.
2073 //      .cc, .cpp, .cxx, .hh, .hpp, .hxx
2074 //              C++ source files. Only useful with cgo or SWIG, and always
2075 //              compiled with the OS-native compiler.
2076 //      .m
2077 //              Objective-C source files. Only useful with cgo, and always
2078 //              compiled with the OS-native compiler.
2079 //      .s, .S, .sx
2080 //              Assembler source files.
2081 //              If the package uses cgo or SWIG, these will be assembled with the
2082 //              OS-native assembler (typically gcc (sic)); otherwise they
2083 //              will be assembled with the Go assembler.
2084 //      .swig, .swigcxx
2085 //              SWIG definition files.
2086 //      .syso
2087 //              System object files.
2088 //
2089 // Files of each of these types except .syso may contain build
2090 // constraints, but the go command stops scanning for build constraints
2091 // at the first item in the file that is not a blank line or //-style
2092 // line comment. See the go/build package documentation for
2093 // more details.
2094 //
2095 //
2096 // The go.mod file
2097 //
2098 // A module version is defined by a tree of source files, with a go.mod
2099 // file in its root. When the go command is run, it looks in the current
2100 // directory and then successive parent directories to find the go.mod
2101 // marking the root of the main (current) module.
2102 //
2103 // The go.mod file format is described in detail at
2104 // https://golang.org/ref/mod#go-mod-file.
2105 //
2106 // To create a new go.mod file, use 'go mod init'. For details see
2107 // 'go help mod init' or https://golang.org/ref/mod#go-mod-init.
2108 //
2109 // To add missing module requirements or remove unneeded requirements,
2110 // use 'go mod tidy'. For details, see 'go help mod tidy' or
2111 // https://golang.org/ref/mod#go-mod-tidy.
2112 //
2113 // To add, upgrade, downgrade, or remove a specific module requirement, use
2114 // 'go get'. For details, see 'go help module-get' or
2115 // https://golang.org/ref/mod#go-get.
2116 //
2117 // To make other changes or to parse go.mod as JSON for use by other tools,
2118 // use 'go mod edit'. See 'go help mod edit' or
2119 // https://golang.org/ref/mod#go-mod-edit.
2120 //
2121 //
2122 // GOPATH environment variable
2123 //
2124 // The Go path is used to resolve import statements.
2125 // It is implemented by and documented in the go/build package.
2126 //
2127 // The GOPATH environment variable lists places to look for Go code.
2128 // On Unix, the value is a colon-separated string.
2129 // On Windows, the value is a semicolon-separated string.
2130 // On Plan 9, the value is a list.
2131 //
2132 // If the environment variable is unset, GOPATH defaults
2133 // to a subdirectory named "go" in the user's home directory
2134 // ($HOME/go on Unix, %USERPROFILE%\go on Windows),
2135 // unless that directory holds a Go distribution.
2136 // Run "go env GOPATH" to see the current GOPATH.
2137 //
2138 // See https://golang.org/wiki/SettingGOPATH to set a custom GOPATH.
2139 //
2140 // Each directory listed in GOPATH must have a prescribed structure:
2141 //
2142 // The src directory holds source code. The path below src
2143 // determines the import path or executable name.
2144 //
2145 // The pkg directory holds installed package objects.
2146 // As in the Go tree, each target operating system and
2147 // architecture pair has its own subdirectory of pkg
2148 // (pkg/GOOS_GOARCH).
2149 //
2150 // If DIR is a directory listed in the GOPATH, a package with
2151 // source in DIR/src/foo/bar can be imported as "foo/bar" and
2152 // has its compiled form installed to "DIR/pkg/GOOS_GOARCH/foo/bar.a".
2153 //
2154 // The bin directory holds compiled commands.
2155 // Each command is named for its source directory, but only
2156 // the final element, not the entire path. That is, the
2157 // command with source in DIR/src/foo/quux is installed into
2158 // DIR/bin/quux, not DIR/bin/foo/quux. The "foo/" prefix is stripped
2159 // so that you can add DIR/bin to your PATH to get at the
2160 // installed commands. If the GOBIN environment variable is
2161 // set, commands are installed to the directory it names instead
2162 // of DIR/bin. GOBIN must be an absolute path.
2163 //
2164 // Here's an example directory layout:
2165 //
2166 //     GOPATH=/home/user/go
2167 //
2168 //     /home/user/go/
2169 //         src/
2170 //             foo/
2171 //                 bar/               (go code in package bar)
2172 //                     x.go
2173 //                 quux/              (go code in package main)
2174 //                     y.go
2175 //         bin/
2176 //             quux                   (installed command)
2177 //         pkg/
2178 //             linux_amd64/
2179 //                 foo/
2180 //                     bar.a          (installed package object)
2181 //
2182 // Go searches each directory listed in GOPATH to find source code,
2183 // but new packages are always downloaded into the first directory
2184 // in the list.
2185 //
2186 // See https://golang.org/doc/code.html for an example.
2187 //
2188 // GOPATH and Modules
2189 //
2190 // When using modules, GOPATH is no longer used for resolving imports.
2191 // However, it is still used to store downloaded source code (in GOPATH/pkg/mod)
2192 // and compiled commands (in GOPATH/bin).
2193 //
2194 // Internal Directories
2195 //
2196 // Code in or below a directory named "internal" is importable only
2197 // by code in the directory tree rooted at the parent of "internal".
2198 // Here's an extended version of the directory layout above:
2199 //
2200 //     /home/user/go/
2201 //         src/
2202 //             crash/
2203 //                 bang/              (go code in package bang)
2204 //                     b.go
2205 //             foo/                   (go code in package foo)
2206 //                 f.go
2207 //                 bar/               (go code in package bar)
2208 //                     x.go
2209 //                 internal/
2210 //                     baz/           (go code in package baz)
2211 //                         z.go
2212 //                 quux/              (go code in package main)
2213 //                     y.go
2214 //
2215 //
2216 // The code in z.go is imported as "foo/internal/baz", but that
2217 // import statement can only appear in source files in the subtree
2218 // rooted at foo. The source files foo/f.go, foo/bar/x.go, and
2219 // foo/quux/y.go can all import "foo/internal/baz", but the source file
2220 // crash/bang/b.go cannot.
2221 //
2222 // See https://golang.org/s/go14internal for details.
2223 //
2224 // Vendor Directories
2225 //
2226 // Go 1.6 includes support for using local copies of external dependencies
2227 // to satisfy imports of those dependencies, often referred to as vendoring.
2228 //
2229 // Code below a directory named "vendor" is importable only
2230 // by code in the directory tree rooted at the parent of "vendor",
2231 // and only using an import path that omits the prefix up to and
2232 // including the vendor element.
2233 //
2234 // Here's the example from the previous section,
2235 // but with the "internal" directory renamed to "vendor"
2236 // and a new foo/vendor/crash/bang directory added:
2237 //
2238 //     /home/user/go/
2239 //         src/
2240 //             crash/
2241 //                 bang/              (go code in package bang)
2242 //                     b.go
2243 //             foo/                   (go code in package foo)
2244 //                 f.go
2245 //                 bar/               (go code in package bar)
2246 //                     x.go
2247 //                 vendor/
2248 //                     crash/
2249 //                         bang/      (go code in package bang)
2250 //                             b.go
2251 //                     baz/           (go code in package baz)
2252 //                         z.go
2253 //                 quux/              (go code in package main)
2254 //                     y.go
2255 //
2256 // The same visibility rules apply as for internal, but the code
2257 // in z.go is imported as "baz", not as "foo/vendor/baz".
2258 //
2259 // Code in vendor directories deeper in the source tree shadows
2260 // code in higher directories. Within the subtree rooted at foo, an import
2261 // of "crash/bang" resolves to "foo/vendor/crash/bang", not the
2262 // top-level "crash/bang".
2263 //
2264 // Code in vendor directories is not subject to import path
2265 // checking (see 'go help importpath').
2266 //
2267 // When 'go get' checks out or updates a git repository, it now also
2268 // updates submodules.
2269 //
2270 // Vendor directories do not affect the placement of new repositories
2271 // being checked out for the first time by 'go get': those are always
2272 // placed in the main GOPATH, never in a vendor subtree.
2273 //
2274 // See https://golang.org/s/go15vendor for details.
2275 //
2276 //
2277 // Legacy GOPATH go get
2278 //
2279 // The 'go get' command changes behavior depending on whether the
2280 // go command is running in module-aware mode or legacy GOPATH mode.
2281 // This help text, accessible as 'go help gopath-get' even in module-aware mode,
2282 // describes 'go get' as it operates in legacy GOPATH mode.
2283 //
2284 // Usage: go get [-d] [-f] [-t] [-u] [-v] [-fix] [build flags] [packages]
2285 //
2286 // Get downloads the packages named by the import paths, along with their
2287 // dependencies. It then installs the named packages, like 'go install'.
2288 //
2289 // The -d flag instructs get to stop after downloading the packages; that is,
2290 // it instructs get not to install the packages.
2291 //
2292 // The -f flag, valid only when -u is set, forces get -u not to verify that
2293 // each package has been checked out from the source control repository
2294 // implied by its import path. This can be useful if the source is a local fork
2295 // of the original.
2296 //
2297 // The -fix flag instructs get to run the fix tool on the downloaded packages
2298 // before resolving dependencies or building the code.
2299 //
2300 // The -t flag instructs get to also download the packages required to build
2301 // the tests for the specified packages.
2302 //
2303 // The -u flag instructs get to use the network to update the named packages
2304 // and their dependencies. By default, get uses the network to check out
2305 // missing packages but does not use it to look for updates to existing packages.
2306 //
2307 // The -v flag enables verbose progress and debug output.
2308 //
2309 // Get also accepts build flags to control the installation. See 'go help build'.
2310 //
2311 // When checking out a new package, get creates the target directory
2312 // GOPATH/src/<import-path>. If the GOPATH contains multiple entries,
2313 // get uses the first one. For more details see: 'go help gopath'.
2314 //
2315 // When checking out or updating a package, get looks for a branch or tag
2316 // that matches the locally installed version of Go. The most important
2317 // rule is that if the local installation is running version "go1", get
2318 // searches for a branch or tag named "go1". If no such version exists
2319 // it retrieves the default branch of the package.
2320 //
2321 // When go get checks out or updates a Git repository,
2322 // it also updates any git submodules referenced by the repository.
2323 //
2324 // Get never checks out or updates code stored in vendor directories.
2325 //
2326 // For more about specifying packages, see 'go help packages'.
2327 //
2328 // For more about how 'go get' finds source code to
2329 // download, see 'go help importpath'.
2330 //
2331 // This text describes the behavior of get when using GOPATH
2332 // to manage source code and dependencies.
2333 // If instead the go command is running in module-aware mode,
2334 // the details of get's flags and effects change, as does 'go help get'.
2335 // See 'go help modules' and 'go help module-get'.
2336 //
2337 // See also: go build, go install, go clean.
2338 //
2339 //
2340 // Module proxy protocol
2341 //
2342 // A Go module proxy is any web server that can respond to GET requests for
2343 // URLs of a specified form. The requests have no query parameters, so even
2344 // a site serving from a fixed file system (including a file:/// URL)
2345 // can be a module proxy.
2346 //
2347 // For details on the GOPROXY protocol, see
2348 // https://golang.org/ref/mod#goproxy-protocol.
2349 //
2350 //
2351 // Import path syntax
2352 //
2353 // An import path (see 'go help packages') denotes a package stored in the local
2354 // file system. In general, an import path denotes either a standard package (such
2355 // as "unicode/utf8") or a package found in one of the work spaces (For more
2356 // details see: 'go help gopath').
2357 //
2358 // Relative import paths
2359 //
2360 // An import path beginning with ./ or ../ is called a relative path.
2361 // The toolchain supports relative import paths as a shortcut in two ways.
2362 //
2363 // First, a relative path can be used as a shorthand on the command line.
2364 // If you are working in the directory containing the code imported as
2365 // "unicode" and want to run the tests for "unicode/utf8", you can type
2366 // "go test ./utf8" instead of needing to specify the full path.
2367 // Similarly, in the reverse situation, "go test .." will test "unicode" from
2368 // the "unicode/utf8" directory. Relative patterns are also allowed, like
2369 // "go test ./..." to test all subdirectories. See 'go help packages' for details
2370 // on the pattern syntax.
2371 //
2372 // Second, if you are compiling a Go program not in a work space,
2373 // you can use a relative path in an import statement in that program
2374 // to refer to nearby code also not in a work space.
2375 // This makes it easy to experiment with small multipackage programs
2376 // outside of the usual work spaces, but such programs cannot be
2377 // installed with "go install" (there is no work space in which to install them),
2378 // so they are rebuilt from scratch each time they are built.
2379 // To avoid ambiguity, Go programs cannot use relative import paths
2380 // within a work space.
2381 //
2382 // Remote import paths
2383 //
2384 // Certain import paths also
2385 // describe how to obtain the source code for the package using
2386 // a revision control system.
2387 //
2388 // A few common code hosting sites have special syntax:
2389 //
2390 //      Bitbucket (Git, Mercurial)
2391 //
2392 //              import "bitbucket.org/user/project"
2393 //              import "bitbucket.org/user/project/sub/directory"
2394 //
2395 //      GitHub (Git)
2396 //
2397 //              import "github.com/user/project"
2398 //              import "github.com/user/project/sub/directory"
2399 //
2400 //      Launchpad (Bazaar)
2401 //
2402 //              import "launchpad.net/project"
2403 //              import "launchpad.net/project/series"
2404 //              import "launchpad.net/project/series/sub/directory"
2405 //
2406 //              import "launchpad.net/~user/project/branch"
2407 //              import "launchpad.net/~user/project/branch/sub/directory"
2408 //
2409 //      IBM DevOps Services (Git)
2410 //
2411 //              import "hub.jazz.net/git/user/project"
2412 //              import "hub.jazz.net/git/user/project/sub/directory"
2413 //
2414 // For code hosted on other servers, import paths may either be qualified
2415 // with the version control type, or the go tool can dynamically fetch
2416 // the import path over https/http and discover where the code resides
2417 // from a <meta> tag in the HTML.
2418 //
2419 // To declare the code location, an import path of the form
2420 //
2421 //      repository.vcs/path
2422 //
2423 // specifies the given repository, with or without the .vcs suffix,
2424 // using the named version control system, and then the path inside
2425 // that repository. The supported version control systems are:
2426 //
2427 //      Bazaar      .bzr
2428 //      Fossil      .fossil
2429 //      Git         .git
2430 //      Mercurial   .hg
2431 //      Subversion  .svn
2432 //
2433 // For example,
2434 //
2435 //      import "example.org/user/foo.hg"
2436 //
2437 // denotes the root directory of the Mercurial repository at
2438 // example.org/user/foo or foo.hg, and
2439 //
2440 //      import "example.org/repo.git/foo/bar"
2441 //
2442 // denotes the foo/bar directory of the Git repository at
2443 // example.org/repo or repo.git.
2444 //
2445 // When a version control system supports multiple protocols,
2446 // each is tried in turn when downloading. For example, a Git
2447 // download tries https://, then git+ssh://.
2448 //
2449 // By default, downloads are restricted to known secure protocols
2450 // (e.g. https, ssh). To override this setting for Git downloads, the
2451 // GIT_ALLOW_PROTOCOL environment variable can be set (For more details see:
2452 // 'go help environment').
2453 //
2454 // If the import path is not a known code hosting site and also lacks a
2455 // version control qualifier, the go tool attempts to fetch the import
2456 // over https/http and looks for a <meta> tag in the document's HTML
2457 // <head>.
2458 //
2459 // The meta tag has the form:
2460 //
2461 //      <meta name="go-import" content="import-prefix vcs repo-root">
2462 //
2463 // The import-prefix is the import path corresponding to the repository
2464 // root. It must be a prefix or an exact match of the package being
2465 // fetched with "go get". If it's not an exact match, another http
2466 // request is made at the prefix to verify the <meta> tags match.
2467 //
2468 // The meta tag should appear as early in the file as possible.
2469 // In particular, it should appear before any raw JavaScript or CSS,
2470 // to avoid confusing the go command's restricted parser.
2471 //
2472 // The vcs is one of "bzr", "fossil", "git", "hg", "svn".
2473 //
2474 // The repo-root is the root of the version control system
2475 // containing a scheme and not containing a .vcs qualifier.
2476 //
2477 // For example,
2478 //
2479 //      import "example.org/pkg/foo"
2480 //
2481 // will result in the following requests:
2482 //
2483 //      https://example.org/pkg/foo?go-get=1 (preferred)
2484 //      http://example.org/pkg/foo?go-get=1  (fallback, only with use of correctly set GOINSECURE)
2485 //
2486 // If that page contains the meta tag
2487 //
2488 //      <meta name="go-import" content="example.org git https://code.org/r/p/exproj">
2489 //
2490 // the go tool will verify that https://example.org/?go-get=1 contains the
2491 // same meta tag and then git clone https://code.org/r/p/exproj into
2492 // GOPATH/src/example.org.
2493 //
2494 // When using GOPATH, downloaded packages are written to the first directory
2495 // listed in the GOPATH environment variable.
2496 // (See 'go help gopath-get' and 'go help gopath'.)
2497 //
2498 // When using modules, downloaded packages are stored in the module cache.
2499 // See https://golang.org/ref/mod#module-cache.
2500 //
2501 // When using modules, an additional variant of the go-import meta tag is
2502 // recognized and is preferred over those listing version control systems.
2503 // That variant uses "mod" as the vcs in the content value, as in:
2504 //
2505 //      <meta name="go-import" content="example.org mod https://code.org/moduleproxy">
2506 //
2507 // This tag means to fetch modules with paths beginning with example.org
2508 // from the module proxy available at the URL https://code.org/moduleproxy.
2509 // See https://golang.org/ref/mod#goproxy-protocol for details about the
2510 // proxy protocol.
2511 //
2512 // Import path checking
2513 //
2514 // When the custom import path feature described above redirects to a
2515 // known code hosting site, each of the resulting packages has two possible
2516 // import paths, using the custom domain or the known hosting site.
2517 //
2518 // A package statement is said to have an "import comment" if it is immediately
2519 // followed (before the next newline) by a comment of one of these two forms:
2520 //
2521 //      package math // import "path"
2522 //      package math /* import "path" */
2523 //
2524 // The go command will refuse to install a package with an import comment
2525 // unless it is being referred to by that import path. In this way, import comments
2526 // let package authors make sure the custom import path is used and not a
2527 // direct path to the underlying code hosting site.
2528 //
2529 // Import path checking is disabled for code found within vendor trees.
2530 // This makes it possible to copy code into alternate locations in vendor trees
2531 // without needing to update import comments.
2532 //
2533 // Import path checking is also disabled when using modules.
2534 // Import path comments are obsoleted by the go.mod file's module statement.
2535 //
2536 // See https://golang.org/s/go14customimport for details.
2537 //
2538 //
2539 // Modules, module versions, and more
2540 //
2541 // Modules are how Go manages dependencies.
2542 //
2543 // A module is a collection of packages that are released, versioned, and
2544 // distributed together. Modules may be downloaded directly from version control
2545 // repositories or from module proxy servers.
2546 //
2547 // For a series of tutorials on modules, see
2548 // https://golang.org/doc/tutorial/create-module.
2549 //
2550 // For a detailed reference on modules, see https://golang.org/ref/mod.
2551 //
2552 // By default, the go command may download modules from https://proxy.golang.org.
2553 // It may authenticate modules using the checksum database at
2554 // https://sum.golang.org. Both services are operated by the Go team at Google.
2555 // The privacy policies for these services are available at
2556 // https://proxy.golang.org/privacy and https://sum.golang.org/privacy,
2557 // respectively.
2558 //
2559 // The go command's download behavior may be configured using GOPROXY, GOSUMDB,
2560 // GOPRIVATE, and other environment variables. See 'go help environment'
2561 // and https://golang.org/ref/mod#private-module-privacy for more information.
2562 //
2563 //
2564 // Module authentication using go.sum
2565 //
2566 // When the go command downloads a module zip file or go.mod file into the
2567 // module cache, it computes a cryptographic hash and compares it with a known
2568 // value to verify the file hasn't changed since it was first downloaded. Known
2569 // hashes are stored in a file in the module root directory named go.sum. Hashes
2570 // may also be downloaded from the checksum database depending on the values of
2571 // GOSUMDB, GOPRIVATE, and GONOSUMDB.
2572 //
2573 // For details, see https://golang.org/ref/mod#authenticating.
2574 //
2575 //
2576 // Package lists and patterns
2577 //
2578 // Many commands apply to a set of packages:
2579 //
2580 //      go action [packages]
2581 //
2582 // Usually, [packages] is a list of import paths.
2583 //
2584 // An import path that is a rooted path or that begins with
2585 // a . or .. element is interpreted as a file system path and
2586 // denotes the package in that directory.
2587 //
2588 // Otherwise, the import path P denotes the package found in
2589 // the directory DIR/src/P for some DIR listed in the GOPATH
2590 // environment variable (For more details see: 'go help gopath').
2591 //
2592 // If no import paths are given, the action applies to the
2593 // package in the current directory.
2594 //
2595 // There are four reserved names for paths that should not be used
2596 // for packages to be built with the go tool:
2597 //
2598 // - "main" denotes the top-level package in a stand-alone executable.
2599 //
2600 // - "all" expands to all packages found in all the GOPATH
2601 // trees. For example, 'go list all' lists all the packages on the local
2602 // system. When using modules, "all" expands to all packages in
2603 // the main module and their dependencies, including dependencies
2604 // needed by tests of any of those.
2605 //
2606 // - "std" is like all but expands to just the packages in the standard
2607 // Go library.
2608 //
2609 // - "cmd" expands to the Go repository's commands and their
2610 // internal libraries.
2611 //
2612 // Import paths beginning with "cmd/" only match source code in
2613 // the Go repository.
2614 //
2615 // An import path is a pattern if it includes one or more "..." wildcards,
2616 // each of which can match any string, including the empty string and
2617 // strings containing slashes. Such a pattern expands to all package
2618 // directories found in the GOPATH trees with names matching the
2619 // patterns.
2620 //
2621 // To make common patterns more convenient, there are two special cases.
2622 // First, /... at the end of the pattern can match an empty string,
2623 // so that net/... matches both net and packages in its subdirectories, like net/http.
2624 // Second, any slash-separated pattern element containing a wildcard never
2625 // participates in a match of the "vendor" element in the path of a vendored
2626 // package, so that ./... does not match packages in subdirectories of
2627 // ./vendor or ./mycode/vendor, but ./vendor/... and ./mycode/vendor/... do.
2628 // Note, however, that a directory named vendor that itself contains code
2629 // is not a vendored package: cmd/vendor would be a command named vendor,
2630 // and the pattern cmd/... matches it.
2631 // See golang.org/s/go15vendor for more about vendoring.
2632 //
2633 // An import path can also name a package to be downloaded from
2634 // a remote repository. Run 'go help importpath' for details.
2635 //
2636 // Every package in a program must have a unique import path.
2637 // By convention, this is arranged by starting each path with a
2638 // unique prefix that belongs to you. For example, paths used
2639 // internally at Google all begin with 'google', and paths
2640 // denoting remote repositories begin with the path to the code,
2641 // such as 'github.com/user/repo'.
2642 //
2643 // Packages in a program need not have unique package names,
2644 // but there are two reserved package names with special meaning.
2645 // The name main indicates a command, not a library.
2646 // Commands are built into binaries and cannot be imported.
2647 // The name documentation indicates documentation for
2648 // a non-Go program in the directory. Files in package documentation
2649 // are ignored by the go command.
2650 //
2651 // As a special case, if the package list is a list of .go files from a
2652 // single directory, the command is applied to a single synthesized
2653 // package made up of exactly those files, ignoring any build constraints
2654 // in those files and ignoring any other files in the directory.
2655 //
2656 // Directory and file names that begin with "." or "_" are ignored
2657 // by the go tool, as are directories named "testdata".
2658 //
2659 //
2660 // Configuration for downloading non-public code
2661 //
2662 // The go command defaults to downloading modules from the public Go module
2663 // mirror at proxy.golang.org. It also defaults to validating downloaded modules,
2664 // regardless of source, against the public Go checksum database at sum.golang.org.
2665 // These defaults work well for publicly available source code.
2666 //
2667 // The GOPRIVATE environment variable controls which modules the go command
2668 // considers to be private (not available publicly) and should therefore not use
2669 // the proxy or checksum database. The variable is a comma-separated list of
2670 // glob patterns (in the syntax of Go's path.Match) of module path prefixes.
2671 // For example,
2672 //
2673 //      GOPRIVATE=*.corp.example.com,rsc.io/private
2674 //
2675 // causes the go command to treat as private any module with a path prefix
2676 // matching either pattern, including git.corp.example.com/xyzzy, rsc.io/private,
2677 // and rsc.io/private/quux.
2678 //
2679 // For fine-grained control over module download and validation, the GONOPROXY
2680 // and GONOSUMDB environment variables accept the same kind of glob list
2681 // and override GOPRIVATE for the specific decision of whether to use the proxy
2682 // and checksum database, respectively.
2683 //
2684 // For example, if a company ran a module proxy serving private modules,
2685 // users would configure go using:
2686 //
2687 //      GOPRIVATE=*.corp.example.com
2688 //      GOPROXY=proxy.example.com
2689 //      GONOPROXY=none
2690 //
2691 // The GOPRIVATE variable is also used to define the "public" and "private"
2692 // patterns for the GOVCS variable; see 'go help vcs'. For that usage,
2693 // GOPRIVATE applies even in GOPATH mode. In that case, it matches import paths
2694 // instead of module paths.
2695 //
2696 // The 'go env -w' command (see 'go help env') can be used to set these variables
2697 // for future go command invocations.
2698 //
2699 // For more details, see https://golang.org/ref/mod#private-modules.
2700 //
2701 //
2702 // Testing flags
2703 //
2704 // The 'go test' command takes both flags that apply to 'go test' itself
2705 // and flags that apply to the resulting test binary.
2706 //
2707 // Several of the flags control profiling and write an execution profile
2708 // suitable for "go tool pprof"; run "go tool pprof -h" for more
2709 // information. The --alloc_space, --alloc_objects, and --show_bytes
2710 // options of pprof control how the information is presented.
2711 //
2712 // The following flags are recognized by the 'go test' command and
2713 // control the execution of any test:
2714 //
2715 //      -bench regexp
2716 //          Run only those benchmarks matching a regular expression.
2717 //          By default, no benchmarks are run.
2718 //          To run all benchmarks, use '-bench .' or '-bench=.'.
2719 //          The regular expression is split by unbracketed slash (/)
2720 //          characters into a sequence of regular expressions, and each
2721 //          part of a benchmark's identifier must match the corresponding
2722 //          element in the sequence, if any. Possible parents of matches
2723 //          are run with b.N=1 to identify sub-benchmarks. For example,
2724 //          given -bench=X/Y, top-level benchmarks matching X are run
2725 //          with b.N=1 to find any sub-benchmarks matching Y, which are
2726 //          then run in full.
2727 //
2728 //      -benchtime t
2729 //          Run enough iterations of each benchmark to take t, specified
2730 //          as a time.Duration (for example, -benchtime 1h30s).
2731 //          The default is 1 second (1s).
2732 //          The special syntax Nx means to run the benchmark N times
2733 //          (for example, -benchtime 100x).
2734 //
2735 //      -count n
2736 //          Run each test, benchmark, and fuzz targets' seed corpora n times
2737 //          (default 1).
2738 //          If -cpu is set, run n times for each GOMAXPROCS value.
2739 //          Examples are always run once.
2740 //
2741 //      -cover
2742 //          Enable coverage analysis.
2743 //          Note that because coverage works by annotating the source
2744 //          code before compilation, compilation and test failures with
2745 //          coverage enabled may report line numbers that don't correspond
2746 //          to the original sources.
2747 //
2748 //      -covermode set,count,atomic
2749 //          Set the mode for coverage analysis for the package[s]
2750 //          being tested. The default is "set" unless -race is enabled,
2751 //          in which case it is "atomic".
2752 //          The values:
2753 //              set: bool: does this statement run?
2754 //              count: int: how many times does this statement run?
2755 //              atomic: int: count, but correct in multithreaded tests;
2756 //                      significantly more expensive.
2757 //          Sets -cover.
2758 //
2759 //      -coverpkg pattern1,pattern2,pattern3
2760 //          Apply coverage analysis in each test to packages matching the patterns.
2761 //          The default is for each test to analyze only the package being tested.
2762 //          See 'go help packages' for a description of package patterns.
2763 //          Sets -cover.
2764 //
2765 //      -cpu 1,2,4
2766 //          Specify a list of GOMAXPROCS values for which the tests, benchmarks or
2767 //          fuzz targets should be executed. The default is the current value
2768 //          of GOMAXPROCS.
2769 //
2770 //      -failfast
2771 //          Do not start new tests after the first test failure.
2772 //
2773 //      -fuzz name
2774 //          Run the fuzz target with the given regexp. Must match exactly one fuzz
2775 //          target. This is an experimental feature.
2776 //
2777 //      -fuzztime t
2778 //          Run enough iterations of the fuzz test to take t, specified as a
2779 //          time.Duration (for example, -fuzztime 1h30s). The default is to run
2780 //          forever.
2781 //          The special syntax Nx means to run the fuzz test N times
2782 //          (for example, -fuzztime 100x).
2783 //
2784 //      -json
2785 //          Log verbose output and test results in JSON. This presents the
2786 //          same information as the -v flag in a machine-readable format.
2787 //
2788 //      -keepfuzzing
2789 //          Keep running the fuzz target if a crasher is found.
2790 //
2791 //      -list regexp
2792 //          List tests, benchmarks, fuzz targets, or examples matching the regular
2793 //          expression. No tests, benchmarks, fuzz targets, or examples will be run.
2794 //          This will only list top-level tests. No subtest or subbenchmarks will be
2795 //          shown.
2796 //
2797 //      -parallel n
2798 //          Allow parallel execution of test functions that call t.Parallel, and
2799 //          f.Fuzz functions that call t.Parallel when running the seed corpus.
2800 //          The value of this flag is the maximum number of tests to run
2801 //          simultaneously. While fuzzing, the value of this flag is the
2802 //          maximum number of workers to run the fuzz function simultaneously,
2803 //          regardless of whether t.Parallel has been called; by default, it is set
2804 //          to the value of GOMAXPROCS.
2805 //          Note that -parallel only applies within a single test binary.
2806 //          The 'go test' command may run tests for different packages
2807 //          in parallel as well, according to the setting of the -p flag
2808 //          (see 'go help build').
2809 //
2810 //      -run regexp
2811 //          Run only those tests, examples, and fuzz targets matching the regular
2812 //          expression. For tests, the regular expression is split by unbracketed
2813 //          slash (/) characters into a sequence of regular expressions, and each
2814 //          part of a test's identifier must match the corresponding element in
2815 //          the sequence, if any. Note that possible parents of matches are
2816 //          run too, so that -run=X/Y matches and runs and reports the result
2817 //          of all tests matching X, even those without sub-tests matching Y,
2818 //          because it must run them to look for those sub-tests.
2819 //
2820 //      -short
2821 //          Tell long-running tests to shorten their run time.
2822 //          It is off by default but set during all.bash so that installing
2823 //          the Go tree can run a sanity check but not spend time running
2824 //          exhaustive tests.
2825 //
2826 //      -shuffle off,on,N
2827 //              Randomize the execution order of tests and benchmarks.
2828 //              It is off by default. If -shuffle is set to on, then it will seed
2829 //              the randomizer using the system clock. If -shuffle is set to an
2830 //              integer N, then N will be used as the seed value. In both cases,
2831 //              the seed will be reported for reproducibility.
2832 //
2833 //      -timeout d
2834 //          If a test binary runs longer than duration d, panic.
2835 //          If d is 0, the timeout is disabled.
2836 //          The default is 10 minutes (10m).
2837 //
2838 //      -v
2839 //          Verbose output: log all tests as they are run. Also print all
2840 //          text from Log and Logf calls even if the test succeeds.
2841 //
2842 //      -vet list
2843 //          Configure the invocation of "go vet" during "go test"
2844 //          to use the comma-separated list of vet checks.
2845 //          If list is empty, "go test" runs "go vet" with a curated list of
2846 //          checks believed to be always worth addressing.
2847 //          If list is "off", "go test" does not run "go vet" at all.
2848 //
2849 // The following flags are also recognized by 'go test' and can be used to
2850 // profile the tests during execution:
2851 //
2852 //      -benchmem
2853 //          Print memory allocation statistics for benchmarks.
2854 //
2855 //      -blockprofile block.out
2856 //          Write a goroutine blocking profile to the specified file
2857 //          when all tests are complete.
2858 //          Writes test binary as -c would.
2859 //
2860 //      -blockprofilerate n
2861 //          Control the detail provided in goroutine blocking profiles by
2862 //          calling runtime.SetBlockProfileRate with n.
2863 //          See 'go doc runtime.SetBlockProfileRate'.
2864 //          The profiler aims to sample, on average, one blocking event every
2865 //          n nanoseconds the program spends blocked. By default,
2866 //          if -test.blockprofile is set without this flag, all blocking events
2867 //          are recorded, equivalent to -test.blockprofilerate=1.
2868 //
2869 //      -coverprofile cover.out
2870 //          Write a coverage profile to the file after all tests have passed.
2871 //          Sets -cover.
2872 //
2873 //      -cpuprofile cpu.out
2874 //          Write a CPU profile to the specified file before exiting.
2875 //          Writes test binary as -c would.
2876 //
2877 //      -memprofile mem.out
2878 //          Write an allocation profile to the file after all tests have passed.
2879 //          Writes test binary as -c would.
2880 //
2881 //      -memprofilerate n
2882 //          Enable more precise (and expensive) memory allocation profiles by
2883 //          setting runtime.MemProfileRate. See 'go doc runtime.MemProfileRate'.
2884 //          To profile all memory allocations, use -test.memprofilerate=1.
2885 //
2886 //      -mutexprofile mutex.out
2887 //          Write a mutex contention profile to the specified file
2888 //          when all tests are complete.
2889 //          Writes test binary as -c would.
2890 //
2891 //      -mutexprofilefraction n
2892 //          Sample 1 in n stack traces of goroutines holding a
2893 //          contended mutex.
2894 //
2895 //      -outputdir directory
2896 //          Place output files from profiling in the specified directory,
2897 //          by default the directory in which "go test" is running.
2898 //
2899 //      -trace trace.out
2900 //          Write an execution trace to the specified file before exiting.
2901 //
2902 // Each of these flags is also recognized with an optional 'test.' prefix,
2903 // as in -test.v. When invoking the generated test binary (the result of
2904 // 'go test -c') directly, however, the prefix is mandatory.
2905 //
2906 // The 'go test' command rewrites or removes recognized flags,
2907 // as appropriate, both before and after the optional package list,
2908 // before invoking the test binary.
2909 //
2910 // For instance, the command
2911 //
2912 //      go test -v -myflag testdata -cpuprofile=prof.out -x
2913 //
2914 // will compile the test binary and then run it as
2915 //
2916 //      pkg.test -test.v -myflag testdata -test.cpuprofile=prof.out
2917 //
2918 // (The -x flag is removed because it applies only to the go command's
2919 // execution, not to the test itself.)
2920 //
2921 // The test flags that generate profiles (other than for coverage) also
2922 // leave the test binary in pkg.test for use when analyzing the profiles.
2923 //
2924 // When 'go test' runs a test binary, it does so from within the
2925 // corresponding package's source code directory. Depending on the test,
2926 // it may be necessary to do the same when invoking a generated test
2927 // binary directly.
2928 //
2929 // The command-line package list, if present, must appear before any
2930 // flag not known to the go test command. Continuing the example above,
2931 // the package list would have to appear before -myflag, but could appear
2932 // on either side of -v.
2933 //
2934 // When 'go test' runs in package list mode, 'go test' caches successful
2935 // package test results to avoid unnecessary repeated running of tests. To
2936 // disable test caching, use any test flag or argument other than the
2937 // cacheable flags. The idiomatic way to disable test caching explicitly
2938 // is to use -count=1.
2939 //
2940 // To keep an argument for a test binary from being interpreted as a
2941 // known flag or a package name, use -args (see 'go help test') which
2942 // passes the remainder of the command line through to the test binary
2943 // uninterpreted and unaltered.
2944 //
2945 // For instance, the command
2946 //
2947 //      go test -v -args -x -v
2948 //
2949 // will compile the test binary and then run it as
2950 //
2951 //      pkg.test -test.v -x -v
2952 //
2953 // Similarly,
2954 //
2955 //      go test -args math
2956 //
2957 // will compile the test binary and then run it as
2958 //
2959 //      pkg.test math
2960 //
2961 // In the first example, the -x and the second -v are passed through to the
2962 // test binary unchanged and with no effect on the go command itself.
2963 // In the second example, the argument math is passed through to the test
2964 // binary, instead of being interpreted as the package list.
2965 //
2966 //
2967 // Testing functions
2968 //
2969 // The 'go test' command expects to find test, benchmark, and example functions
2970 // in the "*_test.go" files corresponding to the package under test.
2971 //
2972 // A test function is one named TestXxx (where Xxx does not start with a
2973 // lower case letter) and should have the signature,
2974 //
2975 //      func TestXxx(t *testing.T) { ... }
2976 //
2977 // A benchmark function is one named BenchmarkXxx and should have the signature,
2978 //
2979 //      func BenchmarkXxx(b *testing.B) { ... }
2980 //
2981 // A fuzz target is one named FuzzXxx and should have the signature,
2982 //
2983 //      func FuzzXxx(f *testing.F) { ... }
2984 //
2985 // An example function is similar to a test function but, instead of using
2986 // *testing.T to report success or failure, prints output to os.Stdout.
2987 // If the last comment in the function starts with "Output:" then the output
2988 // is compared exactly against the comment (see examples below). If the last
2989 // comment begins with "Unordered output:" then the output is compared to the
2990 // comment, however the order of the lines is ignored. An example with no such
2991 // comment is compiled but not executed. An example with no text after
2992 // "Output:" is compiled, executed, and expected to produce no output.
2993 //
2994 // Godoc displays the body of ExampleXxx to demonstrate the use
2995 // of the function, constant, or variable Xxx. An example of a method M with
2996 // receiver type T or *T is named ExampleT_M. There may be multiple examples
2997 // for a given function, constant, or variable, distinguished by a trailing _xxx,
2998 // where xxx is a suffix not beginning with an upper case letter.
2999 //
3000 // Here is an example of an example:
3001 //
3002 //      func ExamplePrintln() {
3003 //              Println("The output of\nthis example.")
3004 //              // Output: The output of
3005 //              // this example.
3006 //      }
3007 //
3008 // Here is another example where the ordering of the output is ignored:
3009 //
3010 //      func ExamplePerm() {
3011 //              for _, value := range Perm(4) {
3012 //                      fmt.Println(value)
3013 //              }
3014 //
3015 //              // Unordered output: 4
3016 //              // 2
3017 //              // 1
3018 //              // 3
3019 //              // 0
3020 //      }
3021 //
3022 // The entire test file is presented as the example when it contains a single
3023 // example function, at least one other function, type, variable, or constant
3024 // declaration, and no fuzz targets or test or benchmark functions.
3025 //
3026 // See the documentation of the testing package for more information.
3027 //
3028 //
3029 // Fuzzing
3030 //
3031 // By default, go test will build and run the fuzz targets using the target's seed
3032 // corpus only. Any generated corpora in $GOCACHE that were previously written by
3033 // the fuzzing engine will not be run by default.
3034 //
3035 // When -fuzz is set, the binary will be instrumented for coverage. After all
3036 // tests, examples, benchmark functions, and the seed corpora for all fuzz targets
3037 // have been run, go test will begin to fuzz the specified fuzz target.
3038 // Note that this feature is experimental.
3039 //
3040 // -run can be used for testing a single seed corpus entry for a fuzz target. The
3041 // regular expression value of -run can be in the form $target/$name, where $target
3042 // is the name of the fuzz target, and $name is the name of the file (ignoring file
3043 // extensions) to run. For example, -run=FuzzFoo/497b6f87.
3044 //
3045 // See https://golang.org/s/draft-fuzzing-design for more details.
3046 //
3047 //
3048 // Controlling version control with GOVCS
3049 //
3050 // The 'go get' command can run version control commands like git
3051 // to download imported code. This functionality is critical to the decentralized
3052 // Go package ecosystem, in which code can be imported from any server,
3053 // but it is also a potential security problem, if a malicious server finds a
3054 // way to cause the invoked version control command to run unintended code.
3055 //
3056 // To balance the functionality and security concerns, the 'go get' command
3057 // by default will only use git and hg to download code from public servers.
3058 // But it will use any known version control system (bzr, fossil, git, hg, svn)
3059 // to download code from private servers, defined as those hosting packages
3060 // matching the GOPRIVATE variable (see 'go help private'). The rationale behind
3061 // allowing only Git and Mercurial is that these two systems have had the most
3062 // attention to issues of being run as clients of untrusted servers. In contrast,
3063 // Bazaar, Fossil, and Subversion have primarily been used in trusted,
3064 // authenticated environments and are not as well scrutinized as attack surfaces.
3065 //
3066 // The version control command restrictions only apply when using direct version
3067 // control access to download code. When downloading modules from a proxy,
3068 // 'go get' uses the proxy protocol instead, which is always permitted.
3069 // By default, the 'go get' command uses the Go module mirror (proxy.golang.org)
3070 // for public packages and only falls back to version control for private
3071 // packages or when the mirror refuses to serve a public package (typically for
3072 // legal reasons). Therefore, clients can still access public code served from
3073 // Bazaar, Fossil, or Subversion repositories by default, because those downloads
3074 // use the Go module mirror, which takes on the security risk of running the
3075 // version control commands using a custom sandbox.
3076 //
3077 // The GOVCS variable can be used to change the allowed version control systems
3078 // for specific packages (identified by a module or import path).
3079 // The GOVCS variable applies when building package in both module-aware mode
3080 // and GOPATH mode. When using modules, the patterns match against the module path.
3081 // When using GOPATH, the patterns match against the import path corresponding to
3082 // the root of the version control repository.
3083 //
3084 // The general form of the GOVCS setting is a comma-separated list of
3085 // pattern:vcslist rules. The pattern is a glob pattern that must match
3086 // one or more leading elements of the module or import path. The vcslist
3087 // is a pipe-separated list of allowed version control commands, or "all"
3088 // to allow use of any known command, or "off" to disallow all commands.
3089 // Note that if a module matches a pattern with vcslist "off", it may still be
3090 // downloaded if the origin server uses the "mod" scheme, which instructs the
3091 // go command to download the module using the GOPROXY protocol.
3092 // The earliest matching pattern in the list applies, even if later patterns
3093 // might also match.
3094 //
3095 // For example, consider:
3096 //
3097 //      GOVCS=github.com:git,evil.com:off,*:git|hg
3098 //
3099 // With this setting, code with a module or import path beginning with
3100 // github.com/ can only use git; paths on evil.com cannot use any version
3101 // control command, and all other paths (* matches everything) can use
3102 // only git or hg.
3103 //
3104 // The special patterns "public" and "private" match public and private
3105 // module or import paths. A path is private if it matches the GOPRIVATE
3106 // variable; otherwise it is public.
3107 //
3108 // If no rules in the GOVCS variable match a particular module or import path,
3109 // the 'go get' command applies its default rule, which can now be summarized
3110 // in GOVCS notation as 'public:git|hg,private:all'.
3111 //
3112 // To allow unfettered use of any version control system for any package, use:
3113 //
3114 //      GOVCS=*:all
3115 //
3116 // To disable all use of version control, use:
3117 //
3118 //      GOVCS=*:off
3119 //
3120 // The 'go env -w' command (see 'go help env') can be used to set the GOVCS
3121 // variable for future go command invocations.
3122 //
3123 //
3124 package main