This commit is contained in:
xxjwxc
2020-05-27 00:00:23 +08:00
parent bcbe69aa5a
commit d8d1bd6bab

View File

@@ -81,7 +81,7 @@ func (a *structAnalys) structFieldInfo(astPkg *ast.Package, sinfo *ast.StructTyp
}
// 判断是否是导出属性(导出属性才允许)(首字母大写)
strArry := []rune(info.Name)
if strArry[0] >= 97 && strArry[0] <= 122 { // 首字母小写
if len(strArry) > 0 && (strArry[0] >= 97 && strArry[0] <= 122) { // 首字母小写
continue
}