Some output cleanups
All checks were successful
Golan Testing / testing (1.24.x, ubuntu-latest) (push) Successful in 23s

This commit is contained in:
2025-05-28 12:54:05 -04:00
parent fa6104f140
commit 9ec0ec5309

View File

@ -467,7 +467,7 @@ func (c *Client) GetVehicleStatus() {
}
}
// GetVehicleStatus .
// GetClimateSettings .
func (c *Client) GetClimateSettings() {
// {
// "success": true,
@ -559,16 +559,13 @@ func (c *Client) execute(requestUrl string, method string, params map[string]str
if err != nil {
c.logger.Error("error while getting body", "error", err.Error())
}
fmt.Printf("RESP BODY: %s\n", string(resBytes))
// if err != nil {
// fmt.Println(err)
// return
// }
respParsed, err := gabs.ParseJSON(resBytes)
if err != nil {
c.logger.Error("error which parsing json", "request", "execute", "method", method, "url", requestUrl, "error", err.Error())
}
c.logger.Debug("HTTP OUTPUT", "body", string(resBytes))
// c.logger.Debug("HTTP OUTPUT", "body", string(resBytes))
_, ok := respParsed.Path("success").Data().(bool)
// value == string, ok == false
@ -623,7 +620,6 @@ func (c *Client) execute(requestUrl string, method string, params map[string]str
time.Sleep(3 * time.Second)
}
}
// fmt.Printf("[DEBUG] HTTP OUTPUT >> %v\n", string([]byte(resp.Body())))
return resBytes
}