-
Notifications
You must be signed in to change notification settings - Fork 24
refactor: write server entities in separate function #463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Kudos, SonarCloud Quality Gate passed!
|
| } | ||
|
|
||
| // get additional data for schema | ||
| foundServer, apiResponse, err := client.ServersApi.DatacentersServersFindById(ctx, datacenterId, *postServer.Id).Depth(4).Execute() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setting entities data previously used this foundServer value, is it equivalent to postServer at line 632 which is now used instead?
| } | ||
| } | ||
| // what we get from backend | ||
| foundFirstNic := (*server.Entities.Nics.Items)[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
outside nil-check for Entities.Nics, also seems to be duplicated at line 675
|
|
||
| if sentFirstNic.Entities != nil && sentFirstNic.Entities.Firewallrules != nil && sentFirstNic.Entities.Firewallrules.Items != nil { | ||
| sentRules := *sentFirstNic.Entities.Firewallrules.Items | ||
| foundFirstNic := (*server.Entities.Nics.Items)[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this needs to be used at line 714, it will go out of scope before that point
|
/test datacenter |
6 similar comments
|
/test datacenter |
|
/test datacenter |
|
/test datacenter |
|
/test datacenter |
|
/test datacenter |
|
/test datacenter |








What does this fix or implement?
Checklist
feat:/fix:/doc:/test:/refactor:)