go/src/cmd/go/internal/modcmd/edit.go

var cmdEdit

var editFmt

var editGo

var editToolchain

var editJSON

var editPrint

var editModule

var edits

type flagFunc

func (f flagFunc) String() string     {}

func (f flagFunc) Set(s string) error {}

func init() {}

func runEdit(ctx context.Context, cmd *base.Command, args []string) {}

// parsePathVersion parses -flag=arg expecting arg to be path@version.
func parsePathVersion(flag, arg string) (path, version string) {}

// parsePath parses -flag=arg expecting arg to be path (not path@version).
func parsePath(flag, arg string) (path string) {}

// parsePathVersionOptional parses path[@version], using adj to
// describe any errors.
func parsePathVersionOptional(adj, arg string, allowDirPath bool) (path, version string, err error) {}

// parseVersionInterval parses a single version like "v1.2.3" or a closed
// interval like "[v1.2.3,v1.4.5]". Note that a single version has the same
// representation as an interval with equal upper and lower bounds: both
// Low and High are set.
func parseVersionInterval(arg string) (modfile.VersionInterval, error) {}

// allowedVersionArg returns whether a token may be used as a version in go.mod.
// We don't call modfile.CheckPathVersion, because that insists on versions
// being in semver form, but here we want to allow versions like "master" or
// "1234abcdef", which the go command will resolve the next time it runs (or
// during -fix).  Even so, we need to make sure the version is a valid token.
func allowedVersionArg(arg string) bool {}

// flagGodebug implements the -godebug flag.
func flagGodebug(arg string) {}

// flagDropGodebug implements the -dropgodebug flag.
func flagDropGodebug(arg string) {}

// flagRequire implements the -require flag.
func flagRequire(arg string) {}

// flagDropRequire implements the -droprequire flag.
func flagDropRequire(arg string) {}

// flagExclude implements the -exclude flag.
func flagExclude(arg string) {}

// flagDropExclude implements the -dropexclude flag.
func flagDropExclude(arg string) {}

// flagReplace implements the -replace flag.
func flagReplace(arg string) {}

// flagDropReplace implements the -dropreplace flag.
func flagDropReplace(arg string) {}

// flagRetract implements the -retract flag.
func flagRetract(arg string) {}

// flagDropRetract implements the -dropretract flag.
func flagDropRetract(arg string) {}

// flagTool implements the -tool flag.
func flagTool(arg string) {}

// flagDropTool implements the -droptool flag.
func flagDropTool(arg string) {}

type fileJSON

type editModuleJSON

type requireJSON

type replaceJSON

type retractJSON

type toolJSON

// editPrintJSON prints the -json output.
func editPrintJSON(modFile *modfile.File) {}