go 1.6
linux_amd_64
go get is an awesome tool download and install repositories from websites. But the problem is many times due bad internet connection or varying internet speed or a large repository it takes a lot of time.All we can do is look at blinking the cursor and there is no way to know how much code has been downloaded or is it installing or downloading .
I would like to request this feature of percentage of completed download and download speed status
in go get tool. It will be very helpful for gophers with slow internet access.
I would also like this to have a switch to enable machine readable progress so that other apps can read it and display it. Thank you.
Seems hard to do, considering we shell out to git, hg, svn, etc to do the actual file transfers.
go get -v
might give you enough information to see what's happening.
most of the time we only use GitHub i.e. git. Can't we use git's built-in progress status ?
for ex. git clone command
For git you'll want to use --progress
when not using a terminal. -v
isn't necessary since it doesn't affect the progress output...
--progress
Progress status is reported on the standard error stream by default when it is attached to a terminal, unless
-q
is specified. This flag forces progress status even if the standard error stream is not directed to a terminal.
I'd be a little concerned that this would be confusing if not provided in the other supported systems, but then I actually didn't realize till now that you actually could use hg, svn etc, so perhaps if you're using those you also know to look for some inconsistencies as the masses swarm git.
For git you'll want to use
--progress
when not using a terminal
For reference, with mercurial the same thing would be something like --config progress.assume-tty=true
(this would still respect any progress.disable=true
that might be in an hg config file).
go get -v
does not provide enough progress information
git's original output is super important to debug proxy issue.
It's not only a "progress".
Make another flag for progress. Stop lumping all this behaviour onto a single flag, it just ends in bikeshedding about what constitutes verbosity.
we do need more progress for go get
, not step-progress like
repo0 (download)
repo1 (download)
...
but download-progress like
Rceiving: 14% (368/2626), 36.01 KiB | 46.00 KiB/s
which enables us to confirm if the net connection is healthy or dead. It's important for user-friendly and also for debug.
go get
does call git
for pull, it's git
's duty to show what we need, so why not just redirect IO of git to standard IO of go get
?
refer to https://gist.github.com/Jimmy-Xu/275c98cdc7be327c9607
This is fairly easy, even in Go code:
proc := exec.Command()
proc.Stderr = os.Stderr
proc.Start()
I don't see why this shouldn't be a thing.
Most helpful comment
go get -v
does not provide enough progress information