1 Star 0 Fork 0

bughou / go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
struct.go 398 Bytes
一键复制 编辑 原始数据 按行查看 历史
bughou 提交于 2022-03-21 20:37 . save
package structpkg
import (
"go/ast"
"go/token"
namepkg "gitee.com/go-better/dev/tool/gospec/rules/name"
)
var Struct = Rule{
key: "struct",
FieldName: namepkg.Rule{
MaxLen: 30,
Style: "camelCase",
},
Size: sizeRule{
MaxFields: 100,
},
}
func Check(node ast.Node, fileSet *token.FileSet) {
switch strut := node.(type) {
case *ast.StructType:
Struct.check(strut, fileSet)
}
}
Go
1
https://gitee.com/bughou/go.git
git@gitee.com:bughou/go.git
bughou
go
go
d31700df43a9

搜索帮助