GOPATH entry is relative 必须是绝对路径,怎么解决

问题描述

enter image description here

go:GOPATH 条目是相对的;必须是绝对路径:“%Jittu%\go”。 更多详情请看:'go help gopath

解决方法

Go 不会在 GOPATH 中扩展 Windows(或任何其他)环境变量。您需要提供绝对路径,例如 setx GOPATH "C:\Users\Jittu\go"

如果您想使用其他变量来设置 GOPATH,则必须在设置 GOPATH 时对其进行扩展,以便 Go 始终将 GOPATH 视为绝对路径。>