Golang : Display packages names during compilation
Problem :
You need to identify the packages that a Golang program need or perhaps you just want to list out the packages names during source codes compilation such as go build
or go install
. How to do that?
Solution :
Add the -v
flag/parameter to go build
or go install
. It will display the names of packages as they are compiled.
-v
also mean verbose mode.
See also : Golang : How to force compile or remove object files first before rebuild?
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+6.3k Golang : How to get capacity of a slice or array?
+5.2k Golang : Print instead of building pyramids
+26k Mac/Linux and Golang : Fix bind: address already in use error
+15.6k Golang : ROT47 (Caesar cipher by 47 characters) example
+10.2k Golang : Wait and sync.WaitGroup example
+11.1k Golang : Fix go.exe is not compatible with the version of Windows you're running
+10.1k Golang : Get login name from environment and prompt for password
+11.7k Golang : Calculations using complex numbers example
+9.6k Golang : Read file with ioutil
+23.7k Find and replace a character in a string in Go
+9.2k nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
+5.9k Golang : Detect variable or constant type