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
+8.9k Golang : How to use Gorilla webtoolkit context package properly
+22.8k Golang : Test file read write permission example
+14.9k Golang : package is not in GOROOT during compilation
+16.9k Golang : XML to JSON example
+5.7k Golang : List all packages and search for certain package
+13.7k Golang : Convert spaces to tabs and back to spaces example
+15.9k Golang : How to reverse elements order in map ?
+18.6k Golang : Implement getters and setters
+20k Golang : Determine if directory is empty with os.File.Readdir() function
+11.6k Golang : Concurrency and goroutine example
+12k Golang : Pagination with go-paginator configuration example
+9k Golang : Intercept and compare HTTP response code example