GOPATH 和 GOROOT 的值应该是多少?

发布于 2024-12-13 04:19:19 字数 722 浏览 0 评论 0 原文

我正在尝试像这样安装 doozer

$ goinstall github.com/ha/doozer

我收到这些错误。

goinstall: os: go/build: 本地找不到包
goinstall: fmt: go/build: 本地找不到包
goinstall: io: go/build: 本地找不到包
goinstall: 反映: go/build: 本地找不到包
goinstall:数学:go/build:本地找不到包
goinstall: rand: go/build: 本地找不到包
goinstall: url: go/build: 本地找不到包
goinstall: net: go/build: 本地找不到包
goinstall:同步:go/build:本地找不到包
goinstall:运行时:go/build:本地找不到包
goinstall:字符串:go/build:本地找不到包
goinstall: 排序: go/build: 本地找不到包
goinstall: strconv: go/build: 本地找不到包
goinstall:字节:go/build:本地找不到包
goinstall:日志:go/build:本地找不到包
goinstall:编码/二进制:go/build:本地找不到包

I'm trying to install doozer like this:

$ goinstall github.com/ha/doozer

I get these errors.

goinstall: os: go/build: package could not be found locally
goinstall: fmt: go/build: package could not be found locally
goinstall: io: go/build: package could not be found locally
goinstall: reflect: go/build: package could not be found locally
goinstall: math: go/build: package could not be found locally
goinstall: rand: go/build: package could not be found locally
goinstall: url: go/build: package could not be found locally
goinstall: net: go/build: package could not be found locally
goinstall: sync: go/build: package could not be found locally
goinstall: runtime: go/build: package could not be found locally
goinstall: strings: go/build: package could not be found locally
goinstall: sort: go/build: package could not be found locally
goinstall: strconv: go/build: package could not be found locally
goinstall: bytes: go/build: package could not be found locally
goinstall: log: go/build: package could not be found locally
goinstall: encoding/binary: go/build: package could not be found locally

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(25

明月松间行 2024-12-20 04:19:19

GOPATHcmd/go进行了讨论文档

GOPATH 环境变量列出了查找 Go 代码的位置。在
Unix,该值是一个以冒号分隔的字符串。在 Windows 上,该值为
以分号分隔的字符串。在计划 9 上,该值是一个列表。

GOPATH 必须设置为在外部获取、构建和安装包
标准 Go 树。

GOPATH 设置为用于安装下载的软件包的自定义目录。

GOROOT安装说明

Go 二进制发行版假设它们将安装在
/usr/local/go(或者Windows下的c:\Go),但可以安装
将 Go 工具移动到不同的位置。在这种情况下,您必须设置
GOROOT 环境变量指向它所在的目录
已安装。

例如,如果您安装了 Go 到您的主目录,您应该添加
将以下命令发送到 $HOME/.profile

导出 GOROOT=$HOME/go
导出 PATH=$PATH:$GOROOT/bin

注意: 仅当安装到自定义位置时才必须设置 GOROOT

从 CY2023 开始,对于任何现代 Go 安装,不要设置/导出 GOROOT< /strong>.

Chris Bunch 的更新版本回答。)

GOPATH is discussed in the cmd/go documentation:

The GOPATH environment variable lists places to look for Go code. On
Unix, the value is a colon-separated string. On Windows, the value is
a semicolon-separated string. On Plan 9, the value is a list.

GOPATH must be set to get, build and install packages outside the
standard Go tree.

Set GOPATH to a custom directory for installing downloaded packages.

GOROOT is discussed in the installation instructions:

The Go binary distributions assume they will be installed in
/usr/local/go (or c:\Go under Windows), but it is possible to install
the Go tools to a different location. In this case you must set the
GOROOT environment variable to point to the directory in which it was
installed.

For example, if you installed Go to your home directory you should add
the following commands to $HOME/.profile:

export GOROOT=$HOME/go
export PATH=$PATH:$GOROOT/bin

Note: GOROOT must be set only when installing to a custom location.

As of CY2023, for any modern Go installation, do not set/export GOROOT.

(updated version of Chris Bunch's answer.)

方圜几里 2024-12-20 04:19:19

这是我的简单设置:

directory for go related things: ~/programming/go
directory for go compiler/tools: ~/programming/go/go-1.4
directory for go software      : ~/programming/go/packages

GOROOT、GOPATH、PATH 设置如下:

export GOROOT=/home/user/programming/go/go-1.4
export GOPATH=/home/user/programming/go/packages
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

所以,简而言之:

GOROOT 用于来自 go 安装的编译器/工具。
GOPATH 适用于您自己的 go 项目/第 3 方库(使用“go get”下载)。

Here is a my simple setup:

directory for go related things: ~/programming/go
directory for go compiler/tools: ~/programming/go/go-1.4
directory for go software      : ~/programming/go/packages

GOROOT, GOPATH, PATH are set as following:

export GOROOT=/home/user/programming/go/go-1.4
export GOPATH=/home/user/programming/go/packages
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

So, in short:

GOROOT is for compiler/tools that comes from go installation.
GOPATH is for your own go projects / 3rd party libraries (downloaded with "go get").

↙厌世 2024-12-20 04:19:19

首先运行 go env
如果您发现 go 尚未安装,您可以通过 homebrew 或通过包和/或其他方式安装它。
如果您看到输出,则说明您的 Go 已安装。
它显示了所有已设置和未设置的环境。

如果您看到 GOROOT 为空:

  1. 运行 which go (在我的计算机上:/usr/local/go/bin/go
  2. 然后导出这个 export GOROOT=/usr/local/go

如果您看到 GOPATH 为空:

  1. 在我的情况下,在计算机上的任何位置为 go 项目创建任何目录:~/ GO_PROJECTS
  2. 然后导出 GOPATH=~/GO_PROJECTS

First run go env.
If you see that the go isn't installed, you can install it via homebrew or via package and/or other ways.
If you are seeing output then your Go is installed.
It shows you all the envs that are set and are not.

If you see empty for GOROOT:

  1. Run which go (On my computer : /usr/local/go/bin/go)
  2. then export like this export GOROOT=/usr/local/go

If you see empty for GOPATH:

  1. Create any directory anywhere on your computer for go projects in my case: ~/GO_PROJECTS
  2. Then export GOPATH=~/GO_PROJECTS
怪我闹别瞎闹 2024-12-20 04:19:19

此处讨论了 GOPATH

GOPATH 环境变量

GOPATH 可以设置为以冒号分隔的路径列表,其中 Go
可以找到代码、包对象和可执行文件。

设置 GOPATH 以使用 goinstall 构建和安装您自己的代码,并
Go 树之外的外部库(并避免编写
Makefile)。

此处讨论了 GOROOT

$GOROOT Go 树的根,通常是 $HOME/go。这默认为
运行 all.bash 的目录的父目录。如果您选择不这样做
设置 $GOROOT 时,必须运行 gomake 而不是 make 或 gmake
使用传统的 makefile 开发 Go 程序。

GOPATH is discussed here:

The GOPATH Environment Variable

GOPATH may be set to a colon-separated list of paths inside which Go
code, package objects, and executables may be found.

Set a GOPATH to use goinstall to build and install your own code and
external libraries outside of the Go tree (and to avoid writing
Makefiles).

And GOROOT is discussed here:

$GOROOT The root of the Go tree, often $HOME/go. This defaults to the
parent of the directory where all.bash is run. If you choose not to
set $GOROOT, you must run gomake instead of make or gmake when
developing Go programs using the conventional makefiles.

懒的傷心 2024-12-20 04:19:19

我阅读了 go help gopath 文档,仍然非常困惑,但从另一个 go 文档页面发现了这个小金块:

GOPATH 环境变量指定工作空间的位置。它可能是开发 Go 代码时需要设置的唯一环境变量。

http://golang.org/doc/code.html#GOPATH

I read the go help gopath docs and was still incredibly confused, but found this little nugget from another go doc page:

The GOPATH environment variable specifies the location of your workspace. It is likely the only environment variable you'll need to set when developing Go code.

http://golang.org/doc/code.html#GOPATH

灯角 2024-12-20 04:19:19

您通常不应显式设置 GOROOT。 go 命令根据其自己的目录位置自动识别适当的 GOROOT


GOPATH 默认为 $HOME/go。如果你想把它放在其他地方,你只需要明确地设置它。

GOPATH 包含:

  • 使用 go install 安装的二进制文件,位于 $GOPATH/bin
    • 可以使用 GOBIN 环境变量覆盖此位置。
  • 下载的模块源代码和校验和的缓存,位于 $GOPATH/pkg /mod
    • 可以使用 GOMODCACHE 环境变量覆盖此位置。

如果您同时设置了GOBINGOMODCACHE,并且没有设置GO111MODULE=off,那么GOPATH本身应该本质上已经没有效果。


此外,在旧版 GOPATH 模式下(当还设置了 GO111MODULE=off 时),GOPATH 包含:

  • 用于构建包的源代码,存储在以 $GOPATH/src 为根的目录树中。
  • 使用 go install 安装的非二进制文件,位于 $GOPATH/pkg

¹ 在 Go 1.17 及更早版本上也可以使用 go get 安装二进制文件,但从 Go 1.16 开始首选 go install;请参阅https://golang.org/doc/go1.16

You generally should not set GOROOT explicitly. The go command identifies the appropriate GOROOT automatically based on its own directory location.


GOPATH defaults to $HOME/go. You only need to set it explicitly if you want to put it somewhere else.

GOPATH contains:

  • Binaries installed using go install, located at $GOPATH/bin
    • This location can be overridden using the GOBIN environment variable.
  • A cache of downloaded module source code and checksums, located at $GOPATH/pkg/mod.
    • This location can be overridden using the GOMODCACHE environment variable.

If you set both GOBIN and GOMODCACHE, and do not set GO111MODULE=off, then GOPATH itself should have essentially no effect.


In addition, in the legacy GOPATH mode (when GO111MODULE=off is also set), GOPATH contains:

  • Source code used to build packages, stored in a directory tree rooted at $GOPATH/src.
  • Non-binaries installed using go install, located at $GOPATH/pkg.
    • Installing non-binary packages is no longer particularly useful: the go command has a cache of built artifacts, which has been required since Go 1.12 even in GOPATH mode.
    • The build cache is not located within GOPATH. Its location can be set with the GOCACHE environment variable.

¹ Binaries can also be installed using go get on Go 1.17 and earlier, but go install is preferred as of Go 1.16; see https://golang.org/doc/go1.16.

尘曦 2024-12-20 04:19:19

从 go 1.8(2017 年第 2 季度)开始,GOPATH 将默认设置为 $HOME/go

请参阅 问题 17262 和 Rob Pike 的评论:

$HOME/go 将会是。
没有单一的最佳答案,但这很简短,而且如果 $HOME/go 已经存在,选择该名称只会是一个问题,这只会发生在已经安装了 go 的专家身上并且会理解GOPATH

Starting with go 1.8 (Q2 2017), GOPATH will be set for you by default to $HOME/go

See issue 17262 and Rob Pike's comment:

$HOME/go it will be.
There is no single best answer but this is short and sweet, and it can only be a problem to choose that name if $HOME/go already exists, which will only happen for experts who already have go installed and will understand GOPATH.

蓝眸 2024-12-20 04:19:19

GOPATH 不应该指向 Go 安装,而是指向您的工作区(请参阅 https://golang.org/doc/code.html#GOPATH)。每当你使用 go get 或 go install 安装某个包时,它都会落在 GOPATH 中。这就是为什么它警告您,您绝对不希望将来自互联网的随机软件包转储到您的官方安装中。

The GOPATH should not point to the Go installation, but rather to your workspace (see https://golang.org/doc/code.html#GOPATH). Whenever you install some package with go get or go install, it will land within the GOPATH. That is why it warns you, that you most definitely do not want random packages from the internet to be dumped into your official installation.

冰雪梦之恋 2024-12-20 04:19:19

具体到GOROOT,Go 1.9会自动将其设置为安装路径。
即使您安装了多个 Go,调用 1.9.x 也会将 GOROOT 设置为 /path/to/go/1.9 (之前,如果没有设置,它会假定默认路径,例如 /usr/local/goc:\Go)。

请参阅 CL Go 评论 53370

go 工具 现在将使用来自调用它来尝试定位 Go 安装树的根
这意味着如果整个 Go 安装移动到新位置,go 工具应该继续照常工作。

这可以通过在环境中设置 GOROOT 来覆盖,这只应在异常情况下执行。
请注意,这不会影响 runtime.GOROOT() 函数的结果< /a>,会继续报告原来的安装位置;这可能会在以后的版本中得到修复。


Regarding GOROOT specifically, Go 1.9 will set it automatically to its installation path.
Even if you have multiple Go installed, calling the 1.9.x one will set GOROOT to /path/to/go/1.9 (before, if not set, it assumed a default path like /usr/local/go or c:\Go).

See CL Go Review 53370:

The go tool will now use the path from which it was invoked to attempt to locate the root of the Go install tree.
This means that if the entire Go installation is moved to a new location, the go tool should continue to work as usual.

This may be overriden by setting GOROOT in the environment, which should only be done in unusual circumstances.
Note that this does not affect the result of the runtime.GOROOT() function, which will continue to report the original installation location; this may be fixed in later releases.

酒绊 2024-12-20 04:19:19

在现代 Go 中,您不需要设置 GOPATHGOROOT。事实上,除非您正在做一些非常专业的事情,否则最好在您的系统上取消设置它们。

使用 Go 模块安装 Go 后,选择您想要工作的目录。然后:

$ mkdir example
$ cd example
$ go mod init example.com

注意模块名称 example.com 是任意的;如果您将工作保存在 GitHub 上,则可能类似于 github.com/your-username/project-name。

最后一个命令将创建一个 go.mod 文件;现在您可以使用 go get 获取依赖项:

$ go get rsc.io/quote

现在您的代码使用此依赖项:

$ touch main.go

将其放入 main.go

package main

import (
    "fmt"

    "rsc.io/quote"
)

func main() {
    fmt.Println(quote.Go())
}

并运行:

$ go run .

Wrt 原始问题,您现在可以获取您的doozer 依赖项:

$ go get github.com/ha/doozer

现在您可以在代码中使用 doozer 模块。等等。您还可以检查目录中的 go.mod 文件,以查看列出的依赖项及其版本。每个模块都是独立的,具有自己的依赖版本。您可以拥有两个并排的模块,每个模块都有自己的 go.mod 文件,指向某些依赖项的不同版本 - 由于模块之间的隔离,这一切都可以正常工作。

有关更多信息,请从此处的官方教程开始。在几个章节中,它将引导您完成上面所示的步骤,以及编写您自己的可重用模块和包,以及从其他模块导入它们。如需其他交互式教程,请访问 https://play-with-go.dev/

In modern Go, you don't need to set GOPATH or GOROOT. In fact, unless you're doing something very specialized, it's best to have them unset on your system.

Use Go modules. Having installed Go, pick a directory where you want to work. Then:

$ mkdir example
$ cd example
$ go mod init example.com

Note that the module name example.com is arbitrary; if you keep your work on GitHub, this could be something like github.com/your-username/project-name.

The last command will have created a go.mod file; now you can grab dependencies with go get:

$ go get rsc.io/quote

Now your code using this dependency:

$ touch main.go

Place this in main.go:

package main

import (
    "fmt"

    "rsc.io/quote"
)

func main() {
    fmt.Println(quote.Go())
}

And run with:

$ go run .

W.r.t. original question, you can now get your doozer dependency with:

$ go get github.com/ha/doozer

Now you can use the doozer module in your code. And so on. You can also examine the go.mod file in your directory to see the dependencies listed, along with their versions. Each module is self-contained, with its own versions of dependencies. You can have two modules alongside each other, each with its own go.mod file pointing to different versions of some dependency - this will all work OK because of the isolation between modules.

For additional information, start with the official tutorial here. In several chapters, it walks you through the steps shown above, as well as writing your own reusable modules and packages, and importing them from other modules. Additional interactive tutorials are available at https://play-with-go.dev/

回忆追雨的时光 2024-12-20 04:19:19

GOPATHGOROOT 配置已弃用。

您可以改用 GO 模块。

例如:

mkdir go_app
cd go_app
go mod init go_app

GOPATH and GOROOT configurations are deprecated.

You can use the GO module instead.

For example:

mkdir go_app
cd go_app
go mod init go_app
一个人练习一个人 2024-12-20 04:19:19

如上所述:

GOPATH 环境变量指定您的位置
工作区。

对于 Windows,这对我有用(在 Ms-dos 窗口中):

set GOPATH=D:\my_folder_for_go_code\

这将创建一个 GOPATH 变量,Ms-dos 在使用时可以识别该变量,如下所示:

cd %GOPATH%

As mentioned above:

The GOPATH environment variable specifies the location of your
workspace.

For Windows, this worked for me (in Ms-dos window):

set GOPATH=D:\my_folder_for_go_code\

This creates a GOPATH variable that Ms-dos recognizes when used as follows:

cd %GOPATH%
傾旎 2024-12-20 04:19:19

有很多答案,但没有实质内容,就像机器人在系统上剪切和粘贴内容一样。无需将 GOROOT 设置为环境变量。但是,有一个有益需要设置GOPATH环境变量,如果不设置,则默认为${HOME}/go/文件夹。

你必须注意的是PATH环境变量,因为这个变量是可以改变你的go版本的变量。不是GOROOT!忘记GOROOT

现在,如果您切换或更改到新的 go 版本,您下载的软件包将使用默认的 $HOME/go 文件夹,并且它将与您之前的 $HOME/go 文件夹混合在一起。 code>go 版本 是。这不好。

因此,您需要在此处定义 GOPATH,以便隔离新 go 版本 的下载包。

总之,忘记GOROOT。更多地考虑GOPATH

Lots of answers but no substance, like robots doing cut and paste on what's on their system. There is no need to set GOROOT as an environment variable. However, there is a beneficial need to set the GOPATH environment variable, and if not set it defaults to ${HOME}/go/ folder.

It is the PATH environment variable that you must pay attention because this variable is the variable that can change your go version. Not GOROOT! Forget GOROOT.

Now, if you switch or change to a new go version, your downloaded packages will use the default $HOME/go folder and it will mixed-up with whatever your previous go version was. This is not good.

Therefore, this is where GOPATH you need to define in order to isolate downloaded packages of the new go version.

In summary, forget GOROOT. Think more on GOPATH.

小…楫夜泊 2024-12-20 04:19:19

运行go helpenvironment,它包含可以通过go env命令列出的每个环境变量的文档

Run go help environment it has documentation for every environment variable that can be listed by go env command

り繁华旳梦境 2024-12-20 04:19:19

您可以使用一个命令:go env GOPATH

There's a command you can use: go env GOPATH

随波逐流 2024-12-20 04:19:19

这是一种解决方案(单用户):

GOROOT=$HOME/.local # your go executable is in $GOROOT/bin
GOPATH=$HOME/.gopath
PATH=$GOROOT/bin:$GOPATH/bin:$PATH

如果将 .gopath 更改为 .gogo 会抱怨。

我希望他们能效仿 rust/cargo 的做法,将所有东西都放在一个地方。

Here is one solution (single user):

GOROOT=$HOME/.local # your go executable is in $GOROOT/bin
GOPATH=$HOME/.gopath
PATH=$GOROOT/bin:$GOPATH/bin:$PATH

go complains if you change .gopath to .go.

I wish they went with how the rust/cargo guys did and just put everything at one place.

痴者 2024-12-20 04:19:19

您不需要显式设置 GOROOT(Go 的现代版本可以根据您运行的 go 二进制文件的位置自行计算)。

此外,在尝试使用 vgo 时出现以下错误:

go: modules disabled inside GOPATH/src by GO111MODULE=auto; see 'go help modules'

删除 GOROOT、更新我的 GOPATH 和 export GO111MODULE="on" 解决了该问题。

GOPATH 参见此处

GOPATH 可以设置为以冒号分隔的路径列表,可以在其中找到 Go 代码、包对象和可执行文件。

设置 GOPATH 以使用 goinstall 在 Go 树之外构建和安装您自己的代码和外部库(并避免编写 Makefile)。

You don't need to explicitly set GOROOT (Modern versions of Go can figure it out on their own based on the location of the go binary that you run).

Also, got the follow error when trying to work with vgo:

go: modules disabled inside GOPATH/src by GO111MODULE=auto; see 'go help modules'

Removing GOROOT, updating my GOPATH and export GO111MODULE="on" resolved the issue.

GOPATH see in here

GOPATH may be set to a colon-separated list of paths inside which Go code, package objects, and executables may be found.

Set a GOPATH to use goinstall to build and install your own code and external libraries outside of the Go tree (and to avoid writing Makefiles).

提笔落墨 2024-12-20 04:19:19

截至 2020 年和 Go 版本 1.13+,在 Windows 中更新 GOPATH 的最佳方法只需在命令提示符中键入:

setx GOPATH C:\mynewgopath

As of 2020 and Go version 1.13+, in Windows the best way for updating GOPATH is just typing in command prompt:

setx GOPATH C:\mynewgopath
娜些时光,永不杰束 2024-12-20 04:19:19

我必须附加

export GOROOT=/usr/local/Cellar/go/1.10.1/libexec

到 Mac OS X 上的 ~/.bash_profile

I had to append

export GOROOT=/usr/local/Cellar/go/1.10.1/libexec

to my ~/.bash_profile on Mac OS X

满地尘埃落定 2024-12-20 04:19:19

还有一种情况,当我们使用 go 时,它会编译所有 go 文件。

假设我们有一个文件 main.go,后来我们将当前文件更改为 main_old.go,然后添加了新的 main.go文件。然后,当我们构建应用程序时,所有 go 文件都将被编译。因此发生的错误可能是由于其他一些 go 文件中的编译错误造成的。

There is also a case where when we use go it compiles all the go files.

So lets say we had one file main.go and later we changed the current file to main_old.go and then added our new main.go file. Then when we build our app all the go files will get compiled. So the error that's happening might be due to compilation error in some other go files.

锦欢 2024-12-20 04:19:19

一旦安装了Go lang,GOROOT就是安装的根目录。

当我在 Windows C:\ 目录中分解 Go Lang 二进制文件时,我的 GOROOT 应该是 C:\go。
如果使用 Windows 安装程序安装,则可能是 C:\Program Files\go(或 C:\Program Files (x86)\go,对于 64 位软件包),

 GOROOT = C:\go

而我的 GOPATH 是 Go lang 源代码或工作区的位置。

如果我的 Go lang 源代码位于 C:\Users\\GO_Workspace,则您的 GOPATH 将如下所示:

 GOPATH = C:\Users\<xyz>\GO_Workspace

Once Go lang is installed, GOROOT is the root directory of the installation.

When I exploded Go Lang binary in Windows C:\ directory, my GOROOT should be C:\go.
If Installed with Windows installer, it may be C:\Program Files\go (or C:\Program Files (x86)\go, for 64-bit packages)

 GOROOT = C:\go

while my GOPATH is location of Go lang source code or workspace.

If my Go lang source code is located at C:\Users\\GO_Workspace, your GOPATH would be as below:

 GOPATH = C:\Users\<xyz>\GO_Workspace
情丝乱 2024-12-20 04:19:19

对于所有新手,如果您使用 Ubuntu,他们可以简单地执行 export GOPATH=$HOME/go 操作,或者执行 go help gopath 获取更多信息。

For all newcomers they could do a simply export GOPATH=$HOME/go if you are using Ubuntu or do go help gopath for more information.

沧桑㈠ 2024-12-20 04:19:19

在osx中​​,我安装了brew,这是适合我的设置

GOPATH="$HOME/my_go_work_space" //make sure you have this folder created

GOROOT="/usr/local/Cellar/go/1.10/libexec"

in osx, i installed with brew, here is the setting that works for me

GOPATH="$HOME/my_go_work_space" //make sure you have this folder created

GOROOT="/usr/local/Cellar/go/1.10/libexec"
夏末染殇 2024-12-20 04:19:19

如果您使用发行版 go,您应该指出包含文件的位置,例如:(

$ rpm -ql golang | grep include
/usr/lib/golang/include

适用于 Fedora 20)

If you are using the distro go, you should point to where the include files are, for example:

$ rpm -ql golang | grep include
/usr/lib/golang/include

(This is for Fedora 20)

牵你的手,一向走下去 2024-12-20 04:19:19

值应为 (MACOS):

GOROOT="/usr/local/go" --> all binaries file core go
GOPATH="/Applications/proyectos/go" --> the route to workspace (custom workspace)

the values should be (MACOS):

GOROOT="/usr/local/go" --> all binaries file core go
GOPATH="/Applications/proyectos/go" --> the route to workspace (custom workspace)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文