1
0
Fork 0
mirror of https://github.com/Luzifer/sii.git synced 2024-10-18 05:14:19 +00:00

Add Ptr and Placement unmarshalling

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2019-11-10 13:41:24 +01:00
parent c3612d8a19
commit 122b4a365c
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -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
}