go get v git clone

277 views
Skip to first unread message

arthurwil...@gmail.com

unread,
Mar 12, 2021, 10:08:32 PM3/12/21
to golang-nuts
if I want to get a git repo of go module code and start hacking on it do I use go get or git clone? I tried go get, but it downloaded to ~/go/pkg/mod and when I tried to run one of the tests it didn't work. Also there's no .git dir with the history in the go get tree of the code. Is there a way to go get the git repo to a path?

Also how do I delete something I go getted?  (or go got?) Looking for the go unget command.

Carla Pfaff

unread,
Mar 13, 2021, 12:13:44 AM3/13/21
to golang-nuts
You use git clone. Go get is for adding a dependency to a project.

Also how do I delete something I go getted?
 
~/go/pkg/mod is just a local cache, nothing you work in. You can clear the whole module cache with go clean -modcache

Sebastien Binet

unread,
Mar 13, 2021, 2:15:38 AM3/13/21
to haskell...@yahoo.de, golan...@googlegroups.com
One has to admit this is a bit of an unfortunate regression in the 'go get' workflow.
Especially for 'vanity import' packages.

What's the repository holding the sources for e.g. 'golang.org/x/tools' or 'gioui.org' ?
It used to be really simple to fetch any 'go get'-import-able project.
Now, not so much.
Nothing unsurmountable, mind you, but still.

Just my 2 (euro) c.
-s






-------- Original Message --------
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/bbb9fabf-9f15-4470-b3de-db809aa26d3en%40googlegroups.com.

arthurwil...@gmail.com

unread,
Mar 13, 2021, 9:34:55 AM3/13/21
to golang-nuts
I just want to remove one thing go getted, not the entire cache. 

Jan Mercl

unread,
Mar 13, 2021, 9:44:44 AM3/13/21
to arthurwil...@gmail.com, golang-nuts
On Sat, Mar 13, 2021 at 3:35 PM arthurwil...@gmail.com
<arthurwil...@gmail.com> wrote:

> I just want to remove one thing go getted, not the entire cache.

For new features one can fill a proposal. If accepted, a follow-up
with the implementation CL is very nice

arthurwil...@gmail.com

unread,
Mar 13, 2021, 10:57:11 AM3/13/21
to golang-nuts
OK I'll try and figure out how to do that. What is a CL?  

Jan Mercl

unread,
Mar 13, 2021, 11:02:50 AM3/13/21
to arthurwil...@gmail.com, golang-nuts
On Sat, Mar 13, 2021 at 4:57 PM arthurwil...@gmail.com
<arthurwil...@gmail.com> wrote:

> OK I'll try and figure out how to do that. What is a CL?

Change List. A patch against the repository that implements a feature,
fixes a bug etc.

arthurwil...@gmail.com

unread,
Mar 13, 2021, 11:09:21 AM3/13/21
to golang-nuts
Thanks Jan. I never heard CL jargon for patchset before.  I was wondering what does Craigs List have to do with this. 

arthurwil...@gmail.com

unread,
Mar 13, 2021, 11:20:49 AM3/13/21
to golang-nuts
Reply all
Reply to author
Forward
0 new messages