Skip to content

Commit

Permalink
add: 使用原生 ast 采集生产 bean
Browse files Browse the repository at this point in the history
  • Loading branch information
cyz-home committed Jul 28, 2023
1 parent c1705c3 commit b2f2d4b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion parser/go.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,10 @@ func (d GoDoc) GetAlias() string {

// IsPointer 普通指针
func (receiver GoTypeAttr) IsPointer() bool {
return receiver.TypeName[0:1] == "*"
if len(receiver.TypeName) >= 1 {
return receiver.TypeName[0:1] == "*"
}
return false
}

func (receiver GoTypeAttr) HasTag(name string) bool {
Expand Down

0 comments on commit b2f2d4b

Please sign in to comment.