Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can 'go build' and 'go test' have default tags?

Tags:

go

Specifically, I'm using the magick package, and the features I'm using dictate that I always need to build it with the 'gm' build tag. Is there a way to declare that build tag by default, so that 'go build' for my project (or 'go test') will implicitly build magick using 'gm'?

like image 683
Oliver Mellet Avatar asked Oct 20 '22 21:10

Oliver Mellet


1 Answers

No, they can't. You either have to type them on the cmd line or use a makefile.

like image 96
Volker Avatar answered Oct 22 '22 21:10

Volker