Skip to content

Commit de1a871

Browse files
committed
fix: fix panic
1 parent 910004c commit de1a871

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

wrapmsg.go

+3
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ func genWrapmsg(posMap map[token.Pos]ast.Node, currentPackagePath string, call *
7171

7272
// よくわからんが重複するので消すやつ
7373
func removeLast(s []string) []string {
74+
if len(s) == 0 {
75+
return nil
76+
}
7477
r := make([]string, len(s)-1)
7578
for i := range r {
7679
r[i] = s[i]

0 commit comments

Comments
 (0)