共 11 篇文章 |
|
go语言web框架beego安装(go mod方式)百度 go mod beego搜索得到的资料。1. 首先我在 github.com/beego/bee 项目上 fork到我自己的项目下。git地址为: git@github.com:****/bee.git.2. 在执行完 go mod init 命令后,会在当前目录生成一个 go.mod 文件。replace github.com/beego/bee v1.10.0 => github.com/***/bee v1.6.2.3. go get -u git... 阅486 转0 评0 公众公开 21-11-08 10:54 |
Golang包管理工具之govendor的使用。#进入到项目目录cd /home/gopath/src/mytool#初始化vendor目录govendor init#查看vendor目录[root@CC54425A mytool]# lscommands main.go vendor mytool_test.sh#将GOPATH中本工程使用到的依赖包自动移动到vendor目录中#说明:如果本地GOPATH没有依赖包,先go get相应的依赖包govendor add +external或使... 阅277 转0 评0 公众公开 21-01-07 15:12 |
go语言string、int、int64互相转换。import "strconv" //先导入strconv包。// string到int.int, err := strconv.Atoi(string)// string到int64.int64, err := strconv.ParseInt(string, 10, 64)// int到string.string := strconv.Itoa(int)// int64到string.FormatInt(int64,10) 阅51 转0 评0 公众公开 20-06-06 16:30 |