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
+19k Golang : Fix cannot download, $GOPATH not set error
+10.2k Golang : Create matrix with Gonum Matrix package example
+7.2k Golang : Gorrila set route name and get the current route name
+34.9k Golang : Strip slashes from string example
+16k Golang : Find out mime type from bytes in buffer
+13.2k Golang : reCAPTCHA example
+4.5k Golang : PGX CopyFrom to insert rows into Postgres database
+5k Golang : Pad file extension automagically
+5.7k Fix ERROR 2003 (HY000): Can't connect to MySQL server on 'IP address' (111)
+20.8k Golang : Sort and reverse sort a slice of strings
+8.8k Golang : How to find out similarity between two strings with Jaro-Winkler Distance?
+8.7k Golang : Inject/embed Javascript before sending out to browser example