Pass user.ID by value in client parameters #190
Labels
No labels
P0
P1
P2
P3
good first issue
pool
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-sdk-go#190
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We pass it by pointer to check whether it is set. However, we can check it without pointer -- user.ID embeds a slice which would be nil.
Even if we were to change it to be
[25]byte
, the first byte is an address prefix and is not zero.And even if we were to change address prefix, the last 4 bytes are the checksum and won't be 0 for 0 slice.
Refs #121
Let me clarify what is @fyrchik talking about:
Consider
PrmContainerList
that uses user.ID as pointer. The field cannot have default value and should be set by the client: look at this.But it is better to introduce a method for
user.ID
that checks is it empty (cheking[]byte
slice within) and to make sure that it has been set up by the client to check it withx.Account.Empty()
instead cheking for nilThe same is fair for other params which use
*user.ID
fixed