![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
go
lerio_cheng
这个作者很懒,什么都没留下…
展开
-
go structTag
go structTag 列子,如下type Message struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Hilarity Message_Humour原创 2018-01-30 18:12:52 · 302 阅读 · 0 评论 -
go time format
time包格式化日期,必须得是这个日期与时间fmt.Println(time.Now().Format("2006年01月"))fmt.Println(time.Now().Format("2006-01-02 15:04:05")) 否则会出现: fmt.Println(time.Now().Format(“2018年01月”)) 输出:24018年01月原创 2018-01-24 14:46:03 · 1272 阅读 · 0 评论 -
go fmt
golang 的fmt 包实现了格式化I/O函数,类似于C的 printf 和 scanf。 # 定义示例类型和变量type Human struct { Name string}var people = Human{Name:"zhangsan"}普通占位符 占位符 说明举例输出转载 2018-01-16 17:04:18 · 4491 阅读 · 0 评论