Mac上打包到Linux执行(go)、import调用本地代码(go)
参考:Managing dependencies - go.dev
GO调用本地代码
module tikv-client-http-go
go 1.16
require (
github.com/tikv/client-go/v2 v2.0.0-unpublished
)
replace github.com/tikv/client-go/v2 v2.0.0-unpublished => ./lib/client-go
GO调用远程包
module tikv-client-http-go
go 1.16
require (
github.com/tikv/client-go/v2 v2.0.0-alpha.0.20210709052506-aadf3cf62721
)
打包在linux上使用:
检查:
LeondeMacBook-Pro:tikv-client-http-go leon$ go env |grep GOARCH GOARCH="amd64" LeondeMacBook-
版权声明:
作者:lichengxin
链接:https://www.techfm.club/p/9730.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。
THE END
二维码
共有 0 条评论