Theo pushed to branch main at Root / CLI / Netboxadm
Commits:
-
bd6e6c6d
by Theo at 2025-08-04T09:36:51-03:00
1 changed file:
Changes:
... | ... | @@ -103,13 +103,15 @@ func (i *Interface) UnmarshalJSON(data []byte) error { |
103 | 103 | i.DeviceType = ObjectTypeVM
|
104 | 104 | }
|
105 | 105 | |
106 | - var alias Interface
|
|
106 | + type interfaceAlias Interface
|
|
107 | + |
|
108 | + var alias interfaceAlias
|
|
107 | 109 | |
108 | 110 | if err := json.Unmarshal(data, &alias); err != nil {
|
109 | 111 | return fmt.Errorf("error unmarshalling interface fields: %w", err)
|
110 | 112 | }
|
111 | 113 | |
112 | - *i = alias
|
|
114 | + *i = Interface(alias)
|
|
113 | 115 | |
114 | 116 | // need to restore
|
115 | 117 | if parentProbe.Device != nil {
|