File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed
internal/namespaces/iot/v1 Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,14 @@ func GetCommands() *core.Commands {
2020 iot .DeviceStatus ("" ),
2121 human .EnumMarshalFunc (deviceStatusMarshalSpecs ),
2222 )
23- human .RegisterMarshalerFunc (iot.CreateNetworkResponse {}, iotNetworkCreateResponsedMarshalerFunc )
24- human .RegisterMarshalerFunc (iot.CreateDeviceResponse {}, iotDeviceCreateResponsedMarshalerFunc )
23+ human .RegisterMarshalerFunc (
24+ & iot.CreateNetworkResponse {},
25+ iotNetworkCreateResponsedMarshalerFunc ,
26+ )
27+ human .RegisterMarshalerFunc (
28+ & iot.CreateDeviceResponse {},
29+ iotDeviceCreateResponsedMarshalerFunc ,
30+ )
2531
2632 cmds .MustFind ("iot" , "hub" , "create" ).Override (hubCreateBuilder )
2733
Original file line number Diff line number Diff line change 3333
3434func iotDeviceCreateResponsedMarshalerFunc (i any , opt * human.MarshalOpt ) (string , error ) {
3535 type tmp iot.CreateDeviceResponse
36- deviceCreateResponse := tmp (i .(iot.CreateDeviceResponse ))
36+ deviceCreateResponse := tmp (* i .(* iot.CreateDeviceResponse ))
3737
3838 deviceContent , err := human .Marshal (deviceCreateResponse .Device , opt )
3939 if err != nil {
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import (
1111
1212func iotNetworkCreateResponsedMarshalerFunc (i any , opt * human.MarshalOpt ) (string , error ) {
1313 type tmp iot.CreateNetworkResponse
14- networkCreateResponse := tmp (i .(iot.CreateNetworkResponse ))
14+ networkCreateResponse := tmp (* i .(* iot.CreateNetworkResponse ))
1515
1616 networkContent , err := human .Marshal (networkCreateResponse .Network , opt )
1717 if err != nil {
You can’t perform that action at this time.
0 commit comments