davidjumani commented on pull request #21:
URL: https://github.com/apache/cloudstack-go/pull/21#issuecomment-979853193


   This does handle and parse both int and string, but since the type of the 
Managementserverid has changed from string to CSLong, it can no longer be used 
as it was before, but rather needs to be explicitly converted to string which 
can break existing applications
   
   In the following example, the `msID` field is a string that is then used to 
store the `Managementserverid` and used later on in the program. Due to the 
change in the type of Managementserverid, it now throws the error or needs 
explicit conversion before it can be used to store the value of 
Managementserverid
   
   ```
   var msID string
   ...............
   resp, err := cs.Host.ListHostsMetrics()
   msID = resp.HostsMetrics[1].Managementserverid     <- 
resp.HostsMetrics[1].Managementserverid (type cloudstack.CSLong) as type string 
in assignment
   
   msID = string(resp.HostsMetrics[1].Managementserverid)     <- works
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to