摘要: 1.注意结构体的属性名首字母一定要大写 package main import ( "fmt" _ "github.com/go-sql-driver/mysql" "github.com/jinzhu/gorm" ) func main() { var roles [] role db, err 阅读全文
posted @ 2021-02-15 22:54 动力起点 阅读(236) 评论(0) 推荐(0)
摘要: 1.下载第三方库:go get gopkg.in/gcfg.v1 2.创建conf.yaml文件 enabled: truepath: d:// 3.解析yaml的代码 package main import ( "fmt" "gopkg.in/yaml.v2" "io/ioutil" "log" 阅读全文
posted @ 2021-02-15 18:07 动力起点 阅读(360) 评论(0) 推荐(0)