尝试过各种地址的excelize和tealeg/xlsx,都是直接go get 不行,然后clone下来后安装又提示golang里的文件缺失。
go版本:go version go1.17.8 windows/amd64
OS版本:Win11
命令:
```
git config --global url.git@github.com:.insteadOf https://github.com/
C:\Users\Gao\go\src\sorter>git clone https://gitclone.com/github.com/360EntSecGroup-Skylar/excelize
Cloning into 'excelize'...
remote: 对象计数中: 4932, 完成.
remote: 压缩对象中: 100% (2610/2610), 完成.
remote: Total 4932 (delta 3808), reused 3028 (delta 2305)Receiving objects: 100% (4932/4932), 3.46 MiB | 766.00 KiB/s
Receiving objects: 100% (4932/4932), 3.52 MiB | 768.00 KiB/s, done.
Resolving deltas: 100% (3808/3808), done.
```
go install 的时候提示如下:
```
excelize\crypt.go:31:2: cannot find package "golang.org/x/crypto/md4" in any of:
C:\Program Files\Go\src\golang.org\x\crypto\md4 (from $GOROOT)
C:\Users\Gao\go\src\golang.org\x\crypto\md4 (from $GOPATH)
excelize\crypt.go:32:2: cannot find package "golang.org/x/crypto/ripemd160" in any of:
C:\Program Files\Go\src\golang.org\x\crypto\ripemd160 (from $GOROOT)
C:\Users\Gao\go\src\golang.org\x\crypto\ripemd160 (from $GOPATH)
excelize\excelize.go:29:2: cannot find package "golang.org/x/net/html/charset" in any of:
C:\Program Files\Go\src\golang.org\x\net\html\charset (from $GOROOT)
C:\Users\Gao\go\src\golang.org\x\net\html\charset (from $GOPATH)
excelize\crypt.go:33:2: cannot find package "golang.org/x/text/encoding/unicode" in any of:
C:\Program Files\Go\src\golang.org\x\text\encoding\unicode (from $GOROOT)
C:\Users\Gao\go\src\golang.org\x\text\encoding\unicode (from $GOPATH)
```
发现目前github上也没有对应的这几个文件呢。
用以下几个命令都报错:
```
git clone https://gitclone.com/github/golang.org/x/crypto/md4
git clone https://gitclone.com/github/golang.org/x/crypto/ripemd160
git clone https://gitclone.com/github/golang.org/x/net/html/charset
git clone https://gitclone.com/github/golang.org/x/text/encoding/unicode
```
这个是我看错了,可以在 GOPATH 目录下拉取。但现在的项目都基本用了 go modules,看到 `go get` 都默认是在 go modules 下拉取。
另外你这个问题是 **golang.org** 这个地址被墙了,如果无法翻墙的话,可以在 GOPATH/github.com/golang 目录下:
```
git clone https://github.com/golang/net.git
git clone https://github.com/golang/text.git
git clone https://github.com/golang/crypto.git
git clone https://github.com/golang/image.git
```
将所有源代码下载下来。还不懂的话自行百度 **无法 go get golang.org**。
#8