IK
Size: a a a
IK
AK
IK
IK
IK
S
u := users.ByID(userID)
- ну вот куда более понятно, лаконично и красиво. не понятно будет только совсем начинающим, имхоIK
Н
Go doesn't provide automatic support for getters and setters. There's nothing wrong with providing getters and setters yourself, and it's often appropriate to do so, but it's neither idiomatic nor necessary to put Get into the getter's name. If you have a field called owner (lower case, unexported), the getter method should be called Owner (upper case, exported), not GetOwner. The use of upper-case names for export provides the hook to discriminate the field from the method. A setter function, if needed, will likely be called SetOwner.
ВГ
МП
ЕО
МП
МП