DEV Community

Discussion on: How I setup golang on docker and deploy it to Heroku

Collapse
 
kissgyorgy profile image
Kiss, György

Go build will download way more than what's necessary, so the final binary will be way bigger. go build ./... should be used.

Collapse
 
wati_fe profile image
Boluwatife Fakorede

Hello György,

I believe what you raised was addressed with the './cmd' as this specifies the directory to build.

Collapse
 
kissgyorgy profile image
Kiss, György

I mean I think you don't need the "RUN go mod download" line at all.