Sorry, this one has correct paths:

cd $GOPATH/src && for dir in github.com/*/* golang.org/*/* gopkg.in/*; do 
echo "go get -u $dir"; done





среда, 8 августа 2018 г., 1:30:53 UTC+3 пользователь Space A. написал:
>
> Hi,
>
> I'm using this approach as workaround:
>
> for dir in src/github.com/*/* src/golang.org/*/* src/gopkg.in/*; do go 
> get -u $dir; done
>
>
>
> понедельник, 6 августа 2018 г., 7:12:58 UTC+3 пользователь Kevin Locke 
> написал:
>>
>> Hello, 
>>
>> Is there a way to update packages installed using `go get` without 
>> duplicating packages that are distributed with Go or by my Linux 
>> distribution? 
>>
>> Background:  I'm not a Go developer (yet).  I am using some programs 
>> written in Go, which I installed using `go get`, and would like to 
>> keep those programs up to date.  Running `go get -u all` or 
>> `cd ~/go && go get -u ./...` both result in many packages being 
>> downloaded and rebuilt unnecessarily (and more with each invocation), 
>> which slows updates significantly and wastes a lot of disk space. 
>> Is there a command which I can run that only updates the packages I 
>> have installed and their dependencies without updating packages 
>> installed system-wide? 
>>
>> As a specific example (using Debian golang-go 2:1.10~5): 
>>
>> $ rm -rf ~/go 
>> $ go get -u mvdan.cc/sh/cmd/shfmt 
>> $ cd ~/go 
>> $ du -hs . 
>> 7.8M        . 
>> $ go list ./... | wc -l 
>> 6 
>> $ go get -u ./... 
>> $ du -hs . 
>> 46M        . 
>> $ go list ./... | wc -l 
>> 98 
>> $ go get -u ./... 
>> $ du -hs . 
>> 111M        . 
>> $ go list ./... | wc -l 
>> 160 
>> $ du -hs . 
>> 181M        . 
>> $ go list ./... | wc -l 
>> 235 
>>
>> (Since each `go get` takes longer to complete, I have not waited until 
>> a stable state is reached.) 
>>
>> Any suggestions or pointers to documentation that I may have 
>> overlooked would be much appreciated. 
>>
>> Thanks, 
>> Kevin 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to