- grom查询——带条件查询
db.Where(&User{Name: "jinzhu", Age: 20}).First(&user)
SELECT * FROM users WHERE name = "jinzhu" AND age = 20 LIMIT
- Go 语言中 UTF-8 包提供的 RuneCountInString() 函数,统计 Uncode 字符数量。
//属性名称的字符数量
utf8.RuneCountInString(property.Name)
go中ioutil.ReadFile("./configuration.json")
configuration.json文件放置在项目目录下,与src同级别