Add a nil case to the expandWildcards function
Signed-off-by: Sergen Yalçın <yalcinsergen97@gmail.com>
This commit is contained in:
parent
8d1435650d
commit
cac4c15ef3
|
|
@ -204,6 +204,8 @@ func expandWildcards(data any, segments Segments) ([]Segments, error) { //nolint
|
||||||
}
|
}
|
||||||
res = append(res, r...)
|
res = append(res, r...)
|
||||||
}
|
}
|
||||||
|
case nil:
|
||||||
|
return nil, errNotFound{errors.Errorf("%s: value of the field is nil", segments[:i])}
|
||||||
default:
|
default:
|
||||||
return nil, errors.Errorf("%q: unexpected wildcard usage", segments[:i])
|
return nil, errors.Errorf("%q: unexpected wildcard usage", segments[:i])
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue