Error in importing github libraries in VS Code

I am trying to import an external library from github by typing
go get githubcom/stretchr/testify/assert on VS code terminal
and I encountered the below error:-

cd C:\Users\Rishabh\go\src\src\githubcom\stretchr\testify; git pull --ff-only

From https://githubcom/stretchr/testify
15aff29…e72b029 master -> origin/master
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

git branch --set-upstream-to=origin/<branch> master

package githubcom/stretchr/testify/assert: exit status 1

I have added git in my environment variable at: C:\Program Files\Git\bin\go
And my GOPATH is : C:\Users\Rishabh\go\src\githubcom\rishabh(it’s the folder under which I am creating my project).

What Should I do to fix it?

P.S. :- Whereever is githubcom it’s actually’s because only 2 links are allowed to post here)


go get githubcom/stretchr/testify
1 Like

now,this error:-

can’t load package: package no Go files in C:\Users\Rishabh\go\src\src\\stretchr\testify

should be

Check if your $GOPATH is okay in the environment variables or try deleting the stretchr folder from $GOPATH/ and executing
go get

@gastonpalomeque Thanks it worked!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.