go-in-action-notes
go-in-action-notes copied to clipboard
在第一章中有处错误,关于 fmt 包位置
编译器会使用我们设置的这两个路径,再加上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 的软连接。
应该是一处笔误,望作者更正。
是不是版本不一样,我的没有这个/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 .
Mac 下使用brew方式安装的会安装到/usr/local/Cellar/go/
目录。
我是官网下载的PKG文件,会安装到 /usr/local/go