You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In arm package, some structures have pointers for slices and maps, for example, Tags of arm.batch.Account and Value of arm.batch.AccountListResult. Is there a particular reason for using pointers instead of having slices and maps directly?
Slice and map variables are nullable. I think it seems okay to not use pointers.
Currently, since those structures have pointers, we have to check whether they are nil or not, and it might be a cause of bugs.
For example, batch.AccountListResult.Value is a pointer as follows
In
arm
package, some structures have pointers for slices and maps, for example,Tags
ofarm.batch.Account
andValue
ofarm.batch.AccountListResult
. Is there a particular reason for using pointers instead of having slices and maps directly?Slice and map variables are nullable. I think it seems okay to not use pointers.
Currently, since those structures have pointers, we have to check whether they are nil or not, and it might be a cause of bugs.
For example, batch.AccountListResult.Value is a pointer as follows
We then have to check whether Value is nil or not before enumerating it:
If the type of
Value
is []Account, we don't need to checkres == nil
in the above code.The text was updated successfully, but these errors were encountered: