mirror of
https://github.com/Luzifer/sii.git
synced 2024-12-21 00:21:15 +00:00
Add Ptr and Placement unmarshalling
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
c3612d8a19
commit
122b4a365c
1 changed files with 10 additions and 2 deletions
|
@ -44,11 +44,19 @@ func genericUnmarshal(in []byte, out interface{}) error {
|
|||
switch typeField.Type {
|
||||
|
||||
case reflect.TypeOf(Ptr{}):
|
||||
// TODO: Implement
|
||||
data := getSingleValue(in, attributeName)
|
||||
v := Ptr{}
|
||||
if err := v.UnmarshalSII(data); err != nil {
|
||||
return errors.Wrapf(err, "Unable to parse Ptr for attribute %q", attributeName)
|
||||
}
|
||||
continue
|
||||
|
||||
case reflect.TypeOf(Placement{}):
|
||||
// TODO: Implement
|
||||
data := getSingleValue(in, attributeName)
|
||||
v := Placement{}
|
||||
if err := v.UnmarshalSII(data); err != nil {
|
||||
return errors.Wrapf(err, "Unable to parse Placement for attribute %q", attributeName)
|
||||
}
|
||||
continue
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue