From b2f2d4ba333ffe34f8ff111a4bd29e25f97f85c0 Mon Sep 17 00:00:00 2001 From: yuanzhao <2206582181@qq.com> Date: Fri, 28 Jul 2023 13:45:02 +0800 Subject: [PATCH] =?UTF-8?q?add:=20=E4=BD=BF=E7=94=A8=E5=8E=9F=E7=94=9F=20a?= =?UTF-8?q?st=20=E9=87=87=E9=9B=86=E7=94=9F=E4=BA=A7=20bean?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parser/go.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/parser/go.go b/parser/go.go index 8a88709..9e6e908 100644 --- a/parser/go.go +++ b/parser/go.go @@ -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 {