A
A
Artem Prokhorov2021-12-08 22:00:29
go
Artem Prokhorov, 2021-12-08 22:00:29

How to find see GOPATH and configure go extension for VSC?

could not import go.mongodb.org/mongo-driver/mongo (cannot find package "go.mongodb.org/mongo-driver/mongo" in any of 
/usr/lib/go-1.17/src/go.mongodb.org/mongo-driver/mongo (from $GOROOT)
/root/go/src/go.mongodb.org/mongo-driver/mongo (from $GOPATH))

There is main.go, which works, uses imported packages without errors. But apparently the extension itself, by default, looks into other directories. Actually how to set it up for the extension and how to see the current (correct) GOPATH?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Kulakov, 2021-12-08
@ivankprod

Install it:
go get go.mongodb.org/mongo-driver/mongo

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question