尝试过各种地址的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
```
有疑问加站长微信联系(非本文作者)