1, the background

-sort-sort.gomain. go: Darwin /amd64 demo path: GOPATH/ SRC /algorithm Demo file structure: algorithm: -sort.gomain. go: Darwin /amd64 demo Path: GOPATH/ SRC /algorithmCopy the code

2. Question: Why is there a wavy line warning, but the code works normally. Looking at the wavy line, I can’t help but go papering papering papering.

3. Find a solution: from the command line:

echo $GOPATH// GOPATH directory go env // output the sameCopy the code

Why is that? I copied the project to the gopath default directory and changed import without warning

There must be something wrong with vscode. Since VScode can be configured, command + opens configuration and searches for gopath:

4, summary: vscode pit, overlay go.gopath fill