xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

Go Gin errors All In One

Go Gin errors All In One

sh: gin: command not found

solution ✅

https://gin-gonic.com/

https://pkg.go.dev/github.com/gin-gonic/gin

Gin is a web framework written in Go (Golang).
It features a martini-like API with performance that is up to 40 times faster thanks to httprouter.
f you need performance and good productivity, you will love Gin.

https://github.com/gin-gonic/gin/releases

install gin

# 安装 Gin 软件包
$ go get -u github.com/gin-gonic/gin

https://gin-gonic.com/zh-cn/docs/quickstart/

??? 设置 Go 工作区

https://learnku.com/articles/43404

https://bbs.huaweicloud.com/blogs/343013

gin 根本就没有安装 ❌,不需要修改 $GOPATH, WTF 💩


# go path 
# export GOPATH=/usr/local/go
# export PATH=$GOPATH/bin:$PATH

# export GOPATH=$HOME/go
# export PATH=$GOPATH/bin:$PATH

# export GOPATH="$HOME/go"
# PATH="$GOPATH/bin:$PATH"

zsh

go path

$ echo $GOPATH

$ echo $PATH | grep $GOPATH

https://github.com/codegangsta/gin/issues/114

$ code .zshrc

$ source ~/.zshrc

https://stackoverflow.com/questions/53665895/tried-to-install-golang-command-but-it-shows-command-is-not-found

$ echo $HOME

$ echo $PATH

https://newbedev.com/error-command-not-found-after-installing-go-eval
https://stackoverflow.com/questions/64567507/pre-commit-prints-golint-command-not-found

Go & macOS & zsh

https://www.geeksforgeeks.org/how-to-install-golang-on-macos/

https://golangdocs.com/install-go-mac-os

$ echo $PATH | pbcopy


refs



©xgqfrms 2012-2020

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2022-08-26 14:56  xgqfrms  阅读(78)  评论(4编辑  收藏  举报