Give prove, stepInto and columnItems a case per node kind, panicking on the rest
This commit is contained in:
@@ -142,6 +142,9 @@ func stepInto(n node, seg string) (node, error) {
|
||||
}
|
||||
case *tableColumn:
|
||||
return nil, fmt.Errorf("no field %q: %q is a column, and a cell holds no fields", seg, n.t.header[n.i])
|
||||
case *nullItem:
|
||||
default:
|
||||
panic(internalError("stepInto has no case for node %T", n))
|
||||
}
|
||||
return nil, fmt.Errorf("no field %q", seg)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user