Golang gin server build error
devesh-anand
HOBBYOP

2 years ago

The nixpack image uses go version 1.19. A package I use (github.com/tursodatabase/libsql-client-go/libsql) requires go version 1.20 or above. Hence the build fails each time with go build -o out failing to build.

Any way I can upgrade the go version?

View Deploy details

ⓘ Deployment information is only viewable by Project members and Railway admins.

Solved

2 Replies

2 years ago

The version that will be used is parsed from the go.mod file.


Status changed to Solved Railway almost 2 years ago


devesh-anand
HOBBYOP

2 years ago

After a lot of reading through documentation, found how to fix it.

Nix pack picks go version from go.mod file as mentioned here.
Changed the version in my go.mod from 1.19 to 1.21, and that worked.


Loading...