go-bindata安裝問題及解決
問題描述
使用命令 go get -u github.com/jteeuwen/go-bindata/...
報錯:
go get -u github.com/go-bindata/go-bindata/...
go get: installing executables with 'go get' in module mode is deprecated.
To adjust and download dependencies of the current module, use 'go get -d'.
To install using requirements of the current module, use 'go install'.
To install ignoring the current module, use 'go install' with a version,
like 'go install example.com/cmd@latest'.
For more information, see https://golang.org/doc/go-get-install-deprecation
or run 'go help get' or 'go help install'.
原因分析
go-bindata對go的版本不同是有不一樣的安裝方式
解決方案
在go的版本>=1.17時,使用如下命令進行安裝go-bindata
go install -a -v github.com/go-bindata/go-bindata/...@latest
總結
以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持腳本之家。
相關文章
Win10系統(tǒng)下Golang環(huán)境搭建全過程
在編程語言的選取上,越來越多的人選擇了Golang,下面這篇文章主要給大家介紹了關于Win10系統(tǒng)下Golang環(huán)境搭建的相關資料,文中通過代碼介紹的非常詳細,需要的朋友可以參考下2024-01-01

