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
+6k Golang : Fibonacci number generator examples
+4.8k Golang : Fix opencv.LoadHaarClassifierCascade The node does not represent a user object error
+11.9k Golang : List objects in AWS S3 bucket
+9.2k Golang : How to profile or log time spend on execution?
+13.4k Golang : package is not in GOROOT during compilation
+6.4k Golang : Individual and total number of words counter example
+4.4k Python : Delay with time.sleep() function example
+29.2k Golang : How to redirect to new page with net/http?
+9.1k Golang : Text file editor (accept input from screen and save to file)
+16.3k Golang : Login and logout a user after password verification and redirect example
+4.4k Golang : Generate Interleaved 2 inch by 5 inch barcode
+5.4k Grep : How to grep for strings inside binary data