[#50] util: Use protowire for util/proto helpers #52

Merged
fyrchik merged 1 commits from aarifullin/frostfs-api-go:feature/50-use_protowire into master 2023-08-10 16:40:55 +00:00
Collaborator
  • Use methods to calculate size

Signed-off-by: Airat Arifullin a.arifullin@yadro.com

* Use methods to calculate size Signed-off-by: Airat Arifullin a.arifullin@yadro.com
aarifullin added the
enhancement
label 2023-08-02 13:55:44 +00:00
aarifullin force-pushed feature/50-use_protowire from c13db54df5 to 173d95c0e7 2023-08-02 14:14:00 +00:00 Compare
aarifullin force-pushed feature/50-use_protowire from 173d95c0e7 to 542d2c64f7 2023-08-02 14:18:36 +00:00 Compare
aarifullin requested review from storage-core-developers 2023-08-02 14:21:20 +00:00
aarifullin requested review from storage-core-committers 2023-08-02 14:21:20 +00:00
aarifullin added the
refactoring
label 2023-08-02 14:25:40 +00:00
acid-ant approved these changes 2023-08-02 14:48:25 +00:00
fyrchik reviewed 2023-08-02 15:29:15 +00:00
@ -90,3 +89,1 @@
prefix := field << 3
return VarUIntSize(uint64(prefix)) + 1 // bool is always 1 byte long
return protowire.SizeGroup(protowire.Number(field), 1)

1 here and 0x1 at 80 worth a comment (or private constant)

`1` here and `0x1` at 80 worth a comment (or private constant)
fyrchik approved these changes 2023-08-02 15:29:18 +00:00
aarifullin force-pushed feature/50-use_protowire from 542d2c64f7 to 553e8f673e 2023-08-03 07:23:49 +00:00 Compare
aarifullin requested review from acid-ant 2023-08-03 12:40:58 +00:00
aarifullin requested review from fyrchik 2023-08-10 07:16:24 +00:00
fyrchik approved these changes 2023-08-10 07:27:31 +00:00
fyrchik merged commit 9a7b47d769 into master 2023-08-10 16:40:55 +00:00
Sign in to join this conversation.
There is no content yet.