fix: fix typo

上级 0ab15d48
......@@ -75,7 +75,11 @@ func BuildPropertyField(field *ast.Field) (string, string) {
typeName = x.String()
case *ast.ArrayType:
typeType = "ArrayType"
typeName = x.Elt.(*ast.Ident).String()
switch typeX := x.Elt.(type) {
case *ast.Ident:
typeName = typeX.String()
}
}
return typeName, typeType
}
......@@ -9,7 +9,7 @@ import (
func Test_ParserLog(t *testing.T) {
g := NewGomegaWithT(t)
abs, _ := filepath.Abs("../../pkg/domain/code_file.go")
abs, _ := filepath.Abs("../../pkg/domain/trial/code_file.go")
results := ProcessFile(abs)
g.Expect(len(results.Members)).To(Equal(1))
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册