前面我们已经创建了 beego 项目,而且我们也看到它已经运行起来了,通过main.go 入口文件,了解下是如何执行的package main import ( "github.com/astaxie/beego" "webclass/models" _ "webclass[...]
网站首页 »
Golang
网站首页 »
Golang
beego 安装go get github.com/astaxie/beegobee 安装go get github.com/beego/beebee 工具使用我们在命令行输入 bee,可以看到如下的信息:Bee is a Fast and Flexible tool for managing your Beego Web Application.[...]
网站首页 »
Golang
时间戳转日期timestamp := 1557042972 //int //func Unix(sec int64, nsec int64){} date := time.Unix(int64(timestamp), 0).Format("2006-01-02 15:04:05") 日期转时间戳 datetime := &[...]
网站首页 »
Golang
截取英文字符串s := "golang hello world" str := s[:3]截取中文字符串s := "hello world 你好啊" str := string([]rune(s)[:8])