summaryrefslogtreecommitdiff
path: root/xmake/modules/package/manager/go/install_package.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules/package/manager/go/install_package.lua')
-rw-r--r--xmake/modules/package/manager/go/install_package.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/xmake/modules/package/manager/go/install_package.lua b/xmake/modules/package/manager/go/install_package.lua
index e8b8a1d37..e6caeae4d 100644
--- a/xmake/modules/package/manager/go/install_package.lua
+++ b/xmake/modules/package/manager/go/install_package.lua
@@ -61,10 +61,8 @@ function main(name, opt)
end
-- get plat and arch
- local plat = opt.plat or config.plat() or os.host()
- local arch = opt.arch or config.arch() or os.arch()
- local goos = goenv.GOOS(plat)
- local goarch = goenv.GOARCH(arch)
+ local goos = goenv.GOOS(opt.plat)
+ local goarch = goenv.GOARCH(opt.arch)
-- get go package to cachedir/pkg/${goos}_${goarch}/github.com/xxx/*.a
local cachedir = _go_get_cachedir(name, opt)