Go get function improvements

121 views
Skip to first unread message

vickey...@gmail.com

unread,
Jun 22, 2017, 10:21:06 AM6/22/17
to golang-nuts
Go get function should import packages exponentially.

Like the dependency of the package and the dependency of the dependent package should all be downloaded at once when we download the package.

It should check if the package exist if not download all of the stuff. Its vry common in languages like R and python. Golang should have it too. Because it then becomes hard to keep track of packages required.

Ian Lance Taylor

unread,
Jun 22, 2017, 10:40:11 AM6/22/17
to Vickey Rawat, golang-nuts
If I understand you correctly, that is how it works today. So I
probably do not understand what you mean. Can you give an example
showing what you do, what you expect to happen, and what happens
instead? Thanks.

Ian

Vickey Rawat

unread,
Jun 22, 2017, 10:44:48 AM6/22/17
to Ian Lance Taylor, golang-nuts
A very simple example is i downloaded a package from github say

GITHUB/GOTA

Now when i use go get github/gota

It installs the package in my src directory

But it doesn't download

Github/gonum

And github/gonum/plots

Too

On which gota package is depended...


That's what i expect it to do too...

Jan Mercl

unread,
Jun 22, 2017, 10:54:03 AM6/22/17
to Vickey Rawat, Ian Lance Taylor, golang-nuts
On Thu, Jun 22, 2017 at 4:44 PM Vickey Rawat <vickey...@gmail.com> wrote:

> GITHUB/GOTA

> Now when i use go get github/gota

github/gota does not look like a valid import path.

If you mean this:

jnml@mate1610-32:~$ echo $GOPATH
/home/jnml
jnml@mate1610-32:~$ rm -rf $GOPATH/src $GOPATH/pkg
jnml@mate1610-32:~$ go get -v github.com/kniren/gota
package github.com/kniren/gota: no buildable Go source files in /home/jnml/src/github.com/kniren/gota
jnml@mate1610-32:~$ 

then the problem is that the import path does not refer to any package so there are no transitive dependencies to download.

Try this:



--

-j

Jan Mercl

unread,
Jun 22, 2017, 10:54:55 AM6/22/17
to Vickey Rawat, Ian Lance Taylor, golang-nuts
Copy paste error eated

jnml@mate1610-32:~$ go get -v github.com/kniren/gota/...

--

-j

Reply all
Reply to author
Forward
0 new messages