earthrise-media / plastics

Other
14 stars 7 forks source link

Go build instructions don't work on first run #44

Open tmcw opened 3 years ago

tmcw commented 3 years ago

On a fresh clone of this repo:

~/sf/plastics-2/api main
❯ go build .
go: github.com/ajg/form@v1.5.1: missing go.sum entry; to add it:
    go mod download github.com/ajg/form

After running the requested command, you get

~/sf/plastics-2/api main*
❯ go build .
database/controller.go:6:2: missing go.sum entry for module providing package github.com/jackc/pgtype (imported by github.com/earthrise-media/plastics/api/database); to add:
    go get github.com/earthrise-media/plastics/api/database
database/controller.go:7:2: missing go.sum entry for module providing package github.com/jackc/pgx/v4 (imported by github.com/earthrise-media/plastics/api/database); to add:
    go get github.com/earthrise-media/plastics/api/database
main.go:7:2: missing go.sum entry for module providing package github.com/jackc/pgx/v4/log/zapadapter (imported by github.com/earthrise-media/plastics/api); to add:
    go get github.com/earthrise-media/plastics/api
database/controller.go:8:2: missing go.sum entry for module providing package github.com/jackc/pgx/v4/pgxpool (imported by github.com/earthrise-media/plastics/api); to add:
    go get github.com/earthrise-media/plastics/api

(and that continues for all of the other dependencies)

tmcw commented 3 years ago

Running go mod tidy seems to do the trick, if you run it first.