...

Text file src/go/doc/comment/testdata/text8.txt

Documentation: go/doc/comment/testdata

     1{"TextWidth": 40}
     2-- input --
     3If the arguments have version suffixes (like @latest or @v1.0.0), "go install"
     4builds packages in module-aware mode, ignoring the go.mod file in the current
     5directory or any parent directory, if there is one. This is useful for
     6installing executables without affecting the dependencies of the main module.
     7To eliminate ambiguity about which module versions are used in the build, the
     8arguments must satisfy the following constraints:
     9
    10 - Arguments must be package paths or package patterns (with "..." wildcards).
    11 They must not be standard packages (like fmt), meta-patterns (std, cmd,
    12 all), or relative or absolute file paths.
    13
    14 - All arguments must have the same version suffix. Different queries are not
    15 allowed, even if they refer to the same version.
    16
    17 - All arguments must refer to packages in the same module at the same version.
    18
    19 - Package path arguments must refer to main packages. Pattern arguments
    20 will only match main packages.
    21
    22 - No module is considered the "main" module. If the module containing
    23 packages named on the command line has a go.mod file, it must not contain
    24 directives (replace and exclude) that would cause it to be interpreted
    25 differently than if it were the main module. The module must not require
    26 a higher version of itself.
    27
    28 - Vendor directories are not used in any module. (Vendor directories are not
    29 included in the module zip files downloaded by 'go install'.)
    30
    31If the arguments don't have version suffixes, "go install" may run in
    32module-aware mode or GOPATH mode, depending on the GO111MODULE environment
    33variable and the presence of a go.mod file. See 'go help modules' for details.
    34If module-aware mode is enabled, "go install" runs in the context of the main
    35module.
    36-- text --
    37If the arguments have version suffixes
    38(like @latest or @v1.0.0), "go install"
    39builds packages in module-aware mode,
    40ignoring the go.mod file in the current
    41directory or any parent directory,
    42if there is one. This is useful for
    43installing executables without affecting
    44the dependencies of the main module.
    45To eliminate ambiguity about which
    46module versions are used in the build,
    47the arguments must satisfy the following
    48constraints:
    49
    50  - Arguments must be package paths
    51    or package patterns (with "..."
    52    wildcards). They must not be
    53    standard packages (like fmt),
    54    meta-patterns (std, cmd, all),
    55    or relative or absolute file paths.
    56
    57  - All arguments must have the same
    58    version suffix. Different queries
    59    are not allowed, even if they refer
    60    to the same version.
    61
    62  - All arguments must refer to packages
    63    in the same module at the same
    64    version.
    65
    66  - Package path arguments must refer
    67    to main packages. Pattern arguments
    68    will only match main packages.
    69
    70  - No module is considered the "main"
    71    module. If the module containing
    72    packages named on the command line
    73    has a go.mod file, it must not
    74    contain directives (replace and
    75    exclude) that would cause it to be
    76    interpreted differently than if it
    77    were the main module. The module
    78    must not require a higher version of
    79    itself.
    80
    81  - Vendor directories are not used in
    82    any module. (Vendor directories are
    83    not included in the module zip files
    84    downloaded by 'go install'.)
    85
    86If the arguments don't have version
    87suffixes, "go install" may run in
    88module-aware mode or GOPATH mode,
    89depending on the GO111MODULE environment
    90variable and the presence of a go.mod
    91file. See 'go help modules' for details.
    92If module-aware mode is enabled,
    93"go install" runs in the context of the
    94main module.

View as plain text