MCPcopy Create free account
hub / github.com/apache/fory / hasGenerateComment

Function hasGenerateComment

go/fory/codegen/parser.go:70–81  ·  view source on GitHub ↗

hasGenerateComment checks if comment group contains //fory:generate

(commentGroup *ast.CommentGroup)

Source from the content-addressed store, hash-verified

68
69// hasGenerateComment checks if comment group contains //fory:generate
70func hasGenerateComment(commentGroup *ast.CommentGroup) bool {
71 if commentGroup == nil {
72 return false
73 }
74
75 for _, comment := range commentGroup.List {
76 if strings.Contains(comment.Text, "fory:generate") {
77 return true
78 }
79 }
80 return false
81}
82
83// extractStructInfo extracts metadata from a struct type
84func extractStructInfo(name string, structType *types.Struct) (*StructInfo, error) {

Callers 1

discoverTypesFromFileFunction · 0.85

Calls 1

ContainsMethod · 0.45

Tested by

no test coverage detected