Structs包括各种Go(Golag)结构实用工具。Structs一开始只是用来转换一个结构体成为一个map[strig]iterface{},后来慢慢发展,现在添加了其他的实用工具。
安装
go get github.com/fatih/structs使用和示例定义和声明结构体:
type Server struct { Name strig `jso:"ame,omitempty"` ID it Eabled bool users []strig // ot exported http.Server // embedded}server := &Server{ Name: "gopher", ID: 123456, Eabled: true,}









评论