go
▶ tree -L 2
.
├── cmd
│ ├── app.go
│ ├── canary.go
├── go.mod
├── go.sum
├── lib
│ ├── clisupport
│ ├── fileutils
├── myapp
├── myapp.go
├── pkg
│ ├── app
│ ├── canary
mainmyapp.go
launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "myconfig",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}",
"args": []
}
]
}
但是,当我单击debug按钮时,进程会出现一个巨大的跟踪,如下所示:
/Users/pkaramol/go/pkg/mod/golang.org/x/oauth2@v0.0.0-20190604053449-0f29369cfe45/google/default.go:17:2: missing go.sum entry for module providing package cloud.google.com/go/compute/metadata (imported by golang.org/x/oauth2/google); to add:
go get golang.org/x/oauth2/google@v0.0.0-20190604053449-0f29369cfe45
/Users/pkaramol/go/pkg/mod/k8s.io/client-go@v0.16.8/discovery/discovery_client.go:28:2: missing go.sum entry for module providing package github.com/golang/protobuf/proto (imported by k8s.io/client-go/discovery); to add:
go get k8s.io/client-go/discovery@v0.16.8
/Users/pkaramol/go/pkg/mod/github.com/googleapis/gnostic@v0.1.0/extensions/extensions.go:23:2: missing go.sum entry for module providing package github.com/golang/protobuf/ptypes (imported by github.com/googleapis/gnostic/extensions); to add:
go get github.com/googleapis/gnostic/extensions@v0.1.0
/Users/pkaramol/go/pkg/mod/github.com/googleapis/gnostic@v0.1.0/OpenAPIv2/OpenAPIv2.pb.go:78:8: missing go.sum entry for module providing package github.com/golang/protobuf/ptypes/any (imported by github.com/googleapis/gnostic/OpenAPIv2); to add:
go get github.com/googleapis/gnostic/OpenAPIv2@v0.1.0
/Users/pkaramol/Workspace/myapp_WORKTREE/myapp/cmd/app.go:13:2: missing go.sum entry for module providing package github.com/spf13/viper (imported by github.com/myorganisation/myapp/cmd); to add:
go get github.com/myorganisation/myapp/cmd
/Users/pkaramol/go/pkg/mod/google.golang.org/api@v0.15.0/transport/http/dial.go:15:2: missing go.sum entry for module providing package go.opencensus.io/plugin/ochttp (imported by google.golang.org/api/transport/http); to add:
go get google.golang.org/api/transport/http@v0.15.0
/Users/pkaramol/go/pkg/mod/google.golang.org/api@v0.15.0/transport/http/internal/propagation/http.go:19:2: missing go.sum entry for module providing package go.opencensus.io/trace (imported by google.golang.org/api/transport/http/internal/propagation); to add:
go get google.golang.org/api/transport/http/internal/propagation@v0.15.0
/Users/pkaramol/go/pkg/mod/google.golang.org/api@v0.15.0/transport/http/internal/propagation/http.go:20:2: missing go.sum entry for module providing package go.opencensus.io/trace/propagation (imported by google.golang.org/api/transport/http/internal/propagation); to add:
go get google.golang.org/api/transport/http/internal/propagation@v0.15.0
/Users/pkaramol/go/pkg/mod/github.com/googleapis/gax-go/v2@v2.0.5/call_option.go:36:2: missing go.sum entry for module providing package google.golang.org/grpc (imported by google.golang.org/api/option); to add:
go get google.golang.org/api/option@v0.15.0
/Users/pkaramol/go/pkg/mod/github.com/googleapis/gax-go/v2@v2.0.5/call_option.go:37:2: missing go.sum entry for module providing package google.golang.org/grpc/codes (imported by github.com/googleapis/gax-go/v2); to add:
go get github.com/googleapis/gax-go/v2@v2.0.5
/Users/pkaramol/go/pkg/mod/google.golang.org/api@v0.15.0/internal/pool.go:10:2: missing go.sum entry for module providing package google.golang.org/grpc/naming (imported by google.golang.org/api/internal); to add:
go get google.golang.org/api/internal@v0.15.0
/Users/pkaramol/go/pkg/mod/github.com/googleapis/gax-go/v2@v2.0.5/call_option.go:38:2: missing go.sum entry for module providing package google.golang.org/grpc/status (imported by github.com/googleapis/gax-go/v2); to add:
go get github.com/googleapis/gax-go/v2@v2.0.5
exit status 1
Process exiting with code: 1
为什么会失败?