Go Get Show Golang Package Download Progress

Updated at: 2020-04-17 Views: 2011 Words: 112 Category: golang

It took a long time to execute today while downloading a golang package, and it didn't finish.

The order is as follows.

go get github.com/GoAdminGroup/go-admin/adm

I don't know if it's the network that's down, or what, because by default GO GET doesn't show progress.

A workaround was found on Reddit that works very well and allows you to check the download progress directly without changing the golang command code:.

strace -f -e trace=network go get github.com/GoAdminGroup/go-admin/adm 2>&1 | pv -i 0.05 > /dev/null

Progress shown.

209KiB 0:00:26 [7.74KiB/s] [ <=> ]

Install pv

If the PV command is not installed, it needs to be installed.

sudo apt install pv

Leave a Comment