So, I'm new to Go. I've created a go.mod file
module github.com/austin/test-project
<--- This is all I've added to the go.mod
I added a tag v0.0.1 to my commit latest git commit.
Based on some examples I tried to understand, I added these imports to my go file(s), where common is one package, dynamo is another, and the import is from a third package called 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"
And here is my output after running go build ./handler/characterstate
where the main go file is:
go: finding github.com/aws/aws-lambda-go/events latest
go: finding github.com/aws/aws-lambda-go/lambda latest
go: finding github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute latest
go: finding github.com/aws/aws-sdk-go/service/dynamodb latest
go: finding github.com/aws/aws-sdk-go/aws latest
go: finding github.com/aws/aws-sdk-go/aws/session latest
go: finding github.com/aws/aws-lambda-go v1.7.0
go: downloading github.com/aws/aws-lambda-go v1.7.0
go: finding github.com/aws/aws-sdk-go/service latest
go: finding github.com/aws/aws-sdk-go v1.15.89
go: downloading github.com/aws/aws-sdk-go v1.15.89
go: finding github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8
go: downloading github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8
The go.mod file is now this:
module github.com/carbonated-dev/madworld-backend
require (
github.com/aws/aws-lambda-go v1.7.0
github.com/aws/aws-sdk-go v1.15.89
)
... and I have a characterstate.exe at the root, and the expected go.sum
In my IDE, GoLand, the import paths for my local common and dynamo packages are still highlighted red.
I've been searching all day, and I've got no idea what's going on. Where am I going wrong? Could it be that the git repo is private that I'm trying to
Thanks in advance. Hope to hear from someone soon :)