![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
basic
NoOne-csdn
永远年轻,永远热泪盈眶
展开
-
golang 结构体标签 struct tag
Golang 可以为结构体的字段添加 tag,类似注释,用反引号``例:const tagName = "validate"type employee struct { ID int `json:"id"` Name string `json:"名字" validate:"presence,min=2,max=40"` Age int `json:"...原创 2019-06-06 10:17:57 · 7478 阅读 · 0 评论 -
golang空标识符 -
package mainimport ( "fmt" _ "github.com/go-sql-driver/mysql" "github.com/golang/protobuf/proto" "math")func main() { for _,j :=range"I LOVE 夏天"{ fmt.Println(string(j)) //fmt.Println(...转载 2019-06-06 10:37:26 · 172 阅读 · 0 评论