MCPcopy
hub / github.com/golang/tools / GoGetModule

Method GoGetModule

gopls/internal/server/command.go:558–567  ·  view source on GitHub ↗
(ctx context.Context, args command.DependencyArgs)

Source from the content-addressed store, hash-verified

556}
557
558func (c *commandHandler) GoGetModule(ctx context.Context, args command.DependencyArgs) error {
559 return c.run(ctx, commandConfig{
560 progress: "Running go get",
561 forURI: args.URI,
562 }, func(ctx context.Context, deps commandDeps) error {
563 return c.s.runGoModUpdateCommands(ctx, deps.snapshot, args.URI, func(invoke func(...string) (*bytes.Buffer, error)) error {
564 return runGoGetModule(invoke, args.AddRequire, args.GoCmdArgs)
565 })
566 })
567}
568
569// TODO(rFindley): UpdateGoSum, Tidy, and Vendor could probably all be one command.
570func (c *commandHandler) UpdateGoSum(ctx context.Context, args command.URIArgs) error {

Callers 2

AddDependencyMethod · 0.95
UpgradeDependencyMethod · 0.95

Calls 3

runMethod · 0.95
runGoGetModuleFunction · 0.85

Tested by

no test coverage detected