Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func parseFieldsLocked(v reflect.Value) (Fields, error) {
}
f.Sizefrom = source.Index
}
if f.Len == -1 && f.Sizefrom == nil {
if f.Len == -1 && f.Sizefrom == nil && f.Type != CustomType {
return nil, fmt.Errorf("struc: field `%s` is a slice with no length or sizeof field", field.Name)
}
// recurse into nested structs
Expand Down