golang gin的安装和引入

1、安装

go get -u github.com/gin-gonic/gin

2、在go.mod写入代码 :

require github.com/gin-gonic/gin v1.7.7

 

3、更新下mod包,test为项目名

go mod init test
go mod tidy

5、引入gin

import "github.com/gin-gonic/gin"

 

posted @ 2022-01-30 16:24  bingxingc  阅读(563)  评论(0编辑  收藏  举报