ZhangZhihui's Blog  

 

复制代码
zzh@ZZHPC:/zdata/Github/greenlight$ go install honnef.co/go/tools/cmd/staticcheck
no required module provides package honnef.co/go/tools/cmd/staticcheck; to add it:
        go get honnef.co/go/tools/cmd/staticcheck
zzh@ZZHPC:/zdata/Github/greenlight$ go install honnef.co/go/tools/cmd/staticcheck@latest
zzh@ZZHPC:/zdata/Github/greenlight$ go install github.com/rakyll/hey
no required module provides package github.com/rakyll/hey; to add it:
        go get github.com/rakyll/hey
zzh@ZZHPC:/zdata/Github/greenlight$ go install github.com/rakyll/hey@latest
zzh@ZZHPC:/zdata/Github/greenlight$
复制代码

It seems @latest is necessary.

 

zzh@ZZHPC:/zdata/Github/greenlight$ which hey
zzh@ZZHPC:/zdata/Github/greenlight$ which staticcheck
/home/zzh/.goenv/shims/staticcheck
zzh@ZZHPC:/zdata/Github/greenlight$ cd /home/zzh/.goenv/shims/
zzh@ZZHPC:~/.goenv/shims$ lh hey
ls: cannot access 'hey': No such file or directory
zzh@ZZHPC:~/.goenv/shims$ lh staticcheck
-rwxrwxr-x 1 zzh zzh 394 Aug 28 14:06 staticcheck

hey and staticcheck installed by the 'go install' commands are here:

zzh@ZZHPC:~/.goenv/shims$ go env GOPATH
/home/zzh/go/1.23.0
zzh@ZZHPC:~/.goenv/shims$ cd /home/zzh/go/1.23.0/bin
zzh@ZZHPC:~/go/1.23.0/bin$ lh hey
-rwxrwxr-x 1 zzh zzh 11M Nov 29 18:51 hey
zzh@ZZHPC:~/go/1.23.0/bin$ lh staticcheck
-rwxrwxr-x 1 zzh zzh 14M Nov 29 18:41 staticcheck

 

 Added GOPATH to PATH.

zzh@ZZHPC:~$ which hey
/home/zzh/go/1.23.0/bin/hey
zzh@ZZHPC:~$ which staticcheck
/home/zzh/.goenv/shims/staticcheck

 

posted on   ZhangZhihuiAAA  阅读(7)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
历史上的今天:
2023-11-29 VSCode - Disable go test cache
2023-11-29 PostgreSQL - Change Timezone
2023-11-29 SQLC - Problem: can't recognize the numeric data types in PostgreSQL
 
点击右上角即可分享
微信分享提示