Skip to content

Commit fbdaddb

Browse files
committed
cleanup
1 parent 4121444 commit fbdaddb

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

parser_types.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,10 @@ func (r *parser) EvalType(expr ast.Expr) (ret Type) {
101101
case *ast.ArrayType:
102102
if t.Len == nil {
103103
return newTypeSlice(r.EvalType(t.Elt))
104-
} else {
105-
le := constValue(t.Len)
106-
i, _ := strconv.ParseInt(le, 0, 0)
107-
return newTypeArray(r.EvalType(t.Elt), int(i))
108104
}
105+
le := constValue(t.Len)
106+
i, _ := strconv.ParseInt(le, 0, 0)
107+
return newTypeArray(r.EvalType(t.Elt), int(i))
109108
case *ast.StructType:
110109
s := &typeStruct{}
111110

types_ptr.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func (t *typePtr) String() string {
1717
return fmt.Sprintf("*%v", t.elem)
1818
}
1919

20-
func (y *typePtr) Kind() Kind {
20+
func (t *typePtr) Kind() Kind {
2121
return Ptr
2222
}
2323

0 commit comments

Comments
 (0)