psycofdj commented on a change in pull request #21:
URL: https://github.com/apache/cloudstack-go/pull/21#discussion_r748280715



##########
File path: cloudstack/HostService.go
##########
@@ -357,7 +357,7 @@ type AddBaremetalHostResponse struct {
        Jobstatus                        int                                
`json:"jobstatus"`
        Lastannotated                    string                             
`json:"lastannotated"`
        Lastpinged                       string                             
`json:"lastpinged"`
-       Managementserverid               string                             
`json:"managementserverid"`
+       Managementserverid               CSLong                             
`json:"managementserverid"`

Review comment:
       ```go
   package main
   
   import (
        "fmt"
        "encoding/json"
   )
   
   type test struct {
     Test string `json:"test,string"`
   }
   
   func main() {
        val := `{"test": 12564564}`
        t := test{}
        err := json.Unmarshal([]byte(val), &t)
        if err != nil {
                fmt.Printf("error: %s\n", err)
        } else {
                fmt.Printf("%#v\n", t)
        }
   }
   ```
   `error: json: invalid use of ,string struct tag, trying to unmarshal 
unquoted value into string`




-- 
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