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
+10k Golang : How to profile or log time spend on execution?
+10.4k Golang : Flip coin example
+7.5k Golang : Error reading timestamp with GORM or SQL driver
+8.6k Golang : HTTP Routing with Goji example
+10.1k Golang : Wait and sync.WaitGroup example
+36.3k Golang : Display float in 2 decimal points and rounding up or down
+4.5k MariaDB/MySQL : Form select statement or search query with Chinese characters
+12.4k Golang : Get absolute path to binary for os.Exec function with exec.LookPath
+28.9k Golang : Saving(serializing) and reading file with GOB
+13.2k Facebook PHP getUser() returns 0
+15.7k Golang : Read large file with bufio.Scanner cause token too long error
+11.3k Golang : Fuzzy string search or approximate string matching example