go-in-action-notes icon indicating copy to clipboard operation
go-in-action-notes copied to clipboard

在第一章中有处错误,关于 fmt 包位置

Open awkj opened this issue 7 years ago • 3 comments

编译器会使用我们设置的这两个路径,再加上import导入的相对全路径来查找磁盘上的包,比如我们导入> 的fmt包,编译器最终找到的是/usr/local/go/fmt这个位置。

这个表述不太准确,比如 Mac 应该是 /usr/local/Cellar/go/1.9.2/libexec 下,/usr/local/go 只是一个 /usr/local/Cellar/go/1.9.2/libexe/bin/go 的软连接。

应该是一处笔误,望作者更正。

awkj avatar Jan 07 '18 09:01 awkj

是不是版本不一样,我的没有这个/usr/local/Cellar/go/1.9.2/libexe/bin/go目录

在 2018年1月7日 下午5:03,马克风物 [email protected]写道:

编译器会使用我们设置的这两个路径,再加上import导入的相对全路径来查找磁盘上的包,比如我们导入> 的fmt包,编译器最终找到的是/usr/local/go/fmt这个位置。

这个表述不太准确,比如 Mac 应该是 /usr/local/Cellar/go/1.9.2/libexec 下,/usr/local/go 只是一个 /usr/local/Cellar/go/1.9.2/libexe/bin/go 的软连接。

应该是一处笔误,望作者更正。

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rujews/go-in-action-notes/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/ABV7LJIEnNrw-wP7Kk6BUtyDCds65J4-ks5tIIhsgaJpZM4RVleQ .

flysnoworg avatar Jan 11 '18 08:01 flysnoworg

Mac 下使用brew方式安装的会安装到/usr/local/Cellar/go/目录。

lifei6671 avatar Dec 05 '18 05:12 lifei6671

我是官网下载的PKG文件,会安装到 /usr/local/go

flysnoworg avatar Dec 05 '18 08:12 flysnoworg