1// Copyright 2018 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
5package modload
6
7import "cmd/go/internal/base"
8
9var HelpModules = &base.Command{
10	UsageLine: "modules",
11	Short:     "modules, module versions, and more",
12	Long: `
13Modules are how Go manages dependencies.
14
15A module is a collection of packages that are released, versioned, and
16distributed together. Modules may be downloaded directly from version control
17repositories or from module proxy servers.
18
19For a series of tutorials on modules, see
20https://golang.org/doc/tutorial/create-module.
21
22For a detailed reference on modules, see https://golang.org/ref/mod.
23
24By default, the go command may download modules from https://proxy.golang.org.
25It may authenticate modules using the checksum database at
26https://sum.golang.org. Both services are operated by the Go team at Google.
27The privacy policies for these services are available at
28https://proxy.golang.org/privacy and https://sum.golang.org/privacy,
29respectively.
30
31The go command's download behavior may be configured using GOPROXY, GOSUMDB,
32GOPRIVATE, and other environment variables. See 'go help environment'
33and https://golang.org/ref/mod#private-module-privacy for more information.
34	`,
35}
36
37var HelpGoMod = &base.Command{
38	UsageLine: "go.mod",
39	Short:     "the go.mod file",
40	Long: `
41A module version is defined by a tree of source files, with a go.mod
42file in its root. When the go command is run, it looks in the current
43directory and then successive parent directories to find the go.mod
44marking the root of the main (current) module.
45
46The go.mod file format is described in detail at
47https://golang.org/ref/mod#go-mod-file.
48
49To create a new go.mod file, use 'go help init'. For details see
50'go help mod init' or https://golang.org/ref/mod#go-mod-init.
51
52To add missing module requirements or remove unneeded requirements,
53use 'go mod tidy'. For details, see 'go help mod tidy' or
54https://golang.org/ref/mod#go-mod-tidy.
55
56To add, upgrade, downgrade, or remove a specific module requirement, use
57'go get'. For details, see 'go help module-get' or
58https://golang.org/ref/mod#go-get.
59
60To make other changes or to parse go.mod as JSON for use by other tools,
61use 'go mod edit'. See 'go help mod edit' or
62https://golang.org/ref/mod#go-mod-edit.
63	`,
64}
65