所以,我是 Go 的新手。我创建了一个 go.mod 文件module github.com/austin/test-project<--- 这就是我添加到 go.mod 中的所有内容我在最新的 git commit 中添加了一个标签 v0.0.1。基于我试图理解的一些示例,我将这些导入添加到我的 go 文件中,其中common是一个包,dynamo是另一个包,导入来自第三个包main。import ("github.com/austin/test-project/common""github.com/austin/test-project/db/dynamo/playerstateddb""github.com/austin/test-project/db/dynamo/characterstateddb""context""fmt""encoding/json""github.com/aws/aws-lambda-go/lambda""github.com/aws/aws-lambda-go/events"这是我在主go build ./handler/characterstatego 文件所在位置运行后的输出:go: finding github.com/aws/aws-lambda-go/events latestgo: finding github.com/aws/aws-lambda-go/lambda latestgo: finding github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute latestgo: finding github.com/aws/aws-sdk-go/service/dynamodb latestgo: finding github.com/aws/aws-sdk-go/aws latestgo: finding github.com/aws/aws-sdk-go/aws/session latestgo: finding github.com/aws/aws-lambda-go v1.7.0go: downloading github.com/aws/aws-lambda-go v1.7.0go: finding github.com/aws/aws-sdk-go/service latestgo: finding github.com/aws/aws-sdk-go v1.15.89go: downloading github.com/aws/aws-sdk-go v1.15.89go: finding github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8go: downloading github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8go.mod 文件现在是这样的:module github.com/carbonated-dev/madworld-backendrequire ( github.com/aws/aws-lambda-go v1.7.0 github.com/aws/aws-sdk-go v1.15.89)...我在根目录下有一个 characterstate.exe,以及预期的 go.sum在我的 IDE GoLand 中,本地通用包和dynamo包的导入路径仍然以红色突出显示。我整天都在寻找,但我不知道发生了什么。我哪里错了?难道是我正在尝试的 git repo 是私有的提前致谢。希望很快收到某人的来信:)
- 1 回答
- 0 关注
- 108 浏览
添加回答
举报
0/150
提交
取消