File tree 2 files changed +5
-6
lines changed
2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -48,12 +48,12 @@ func printOut(res any, wideOutput bool) {
48
48
}
49
49
}
50
50
if outputformat == feedback .Text {
51
- if st , ok := res .(* otaapi.OtaStatusResponse ); ok {
51
+ if st , ok := res .(* otaapi.OtaStatusPrint ); ok {
52
52
fmt .Println (st .Ota .ToText ())
53
53
fmt .Println ()
54
54
fmt .Println ("Details:" )
55
- for i := range st .States {
56
- fmt .Println (st .States [i ].ToText ())
55
+ for i := range st .Details {
56
+ fmt .Println (st .Details [i ].ToText ())
57
57
}
58
58
}
59
59
if st , ok := res .([]otaapi.Ota ); ok {
Original file line number Diff line number Diff line change @@ -149,11 +149,10 @@ func (c *OtaApiClient) GetOtaStatusByDeviceID(deviceID string) (*OtaStatusByDevi
149
149
}
150
150
return t1 .After (t2 )
151
151
})
152
- } else if res .StatusCode == 404 || res .StatusCode == 400 {
153
- return nil , fmt .Errorf ("device-id %s not found" , deviceID )
154
152
}
155
-
156
153
return & otaResponse , nil
154
+ } else if res .StatusCode == 404 || res .StatusCode == 400 {
155
+ return nil , fmt .Errorf ("device-id %s not found" , deviceID )
157
156
}
158
157
159
158
return nil , err
You can’t perform that action at this time.
0 commit comments