Answer the question
In order to leave comments, you need to log in
How to specify for Golang the ability to use files from the src of the project?
The Golang SDK itself is installed in C:\Go , and the project lies, for example, in D:\Proj and the project folder contains the src directory , which contains the files used in the project...
The essence of the problem is this:
main.go:5:2: cannot find package "Proj/src" in any of:
C:\Go\src\Proj\src (from $GOROOT)
C:\Go\bin\src\Proj\src (from $GOPATH)
package main
import (
"Proj/src"
)
func main() {
}
Answer the question
In order to leave comments, you need to log in
1. Non-idiomatic path - specify relative paths - "./Proj/src"
2. Follow the recommendation https://golang.org/doc/code.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question