Below is the message reported by the analyzer for this snippet of code. Beware that the analyzer only reports the first
issue it finds, so please do not limit your consideration to the contents of the below message.
Click here to show the 14 line(s) of Go which triggered the analyzer.
```go
for _, v := range resp.Instances {
jsServer, _ := json.MarshalIndent(v, "", " ")
fmt.Println("Server info is :", string(jsServer))
fmt.Println("Server id is :", v.Id)
if v.Id == instanceID && v.Status == "ACTIVE" {
instanceResTmp = &v
fmt.Println("[LogInfor]GetRdsInstanceInfo create instance status is ACTIVE infor: ", instanceResTmp)
return true, nil
}
if v.Id == instanceID && v.Status != "ACTIVE" {
fmt.Println("[LogInfor]GetRdsInstanceInfo create instance status is: ", v.Status)
return true, nil
}
}
```
Leave a reaction on this issue to contribute to the project by classifying this instance as a Bug :-1:, Mitigated :+1:, or Desirable Behavior :rocket:
See the descriptions of the classifications here for more information.
Found a possible issue in huaweicloud/huaweicloud-sdk-go at examples/rds/v3/instances_ext.go
Below is the message reported by the analyzer for this snippet of code. Beware that the analyzer only reports the first issue it finds, so please do not limit your consideration to the contents of the below message.
Click here to see the code in its original context.
Click here to show the 14 line(s) of Go which triggered the analyzer.
```go for _, v := range resp.Instances { jsServer, _ := json.MarshalIndent(v, "", " ") fmt.Println("Server info is :", string(jsServer)) fmt.Println("Server id is :", v.Id) if v.Id == instanceID && v.Status == "ACTIVE" { instanceResTmp = &v fmt.Println("[LogInfor]GetRdsInstanceInfo create instance status is ACTIVE infor: ", instanceResTmp) return true, nil } if v.Id == instanceID && v.Status != "ACTIVE" { fmt.Println("[LogInfor]GetRdsInstanceInfo create instance status is: ", v.Status) return true, nil } } ```Leave a reaction on this issue to contribute to the project by classifying this instance as a Bug :-1:, Mitigated :+1:, or Desirable Behavior :rocket: See the descriptions of the classifications here for more information.
commit ID: f7f79ffe470a8b339ef55207a84ff264f0e67e04