Add utility methods #106

Merged
fyrchik merged 2 commits from acid-ant/frostfs-sdk-go:feature/101-addr-equals into master 2023-07-10 09:05:03 +00:00
Member

Add methods:

  • IterateUserAttributes in Container
  • Equals in Address

Close #101 #97

Signed-off-by: Anton Nikiforov an.nikiforov@yadro.com

Add methods: - `IterateUserAttributes` in `Container` - `Equals` in `Address` Close #101 #97 Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
acid-ant requested review from storage-core-committers 2023-07-06 11:18:53 +00:00
acid-ant requested review from storage-core-developers 2023-07-06 11:18:53 +00:00
acid-ant changed title from Add `Equals` for `Address` to WPIP: Add `Equals` for `Address` 2023-07-06 11:31:28 +00:00
acid-ant changed title from WPIP: Add `Equals` for `Address` to WIP: Add `Equals` for `Address` 2023-07-06 11:31:49 +00:00
acid-ant changed title from WIP: Add `Equals` for `Address` to Add utility methods 2023-07-06 11:56:19 +00:00
dstepanov-yadro reviewed 2023-07-06 14:17:50 +00:00
@ -172,0 +174,4 @@
//
// Note that comparison using '==' operator is not recommended since it MAY result
// in loss of compatibility.
func (x Address) Equals(addr1 Address) bool {

addr1 looks strange. Maybe other?

addr1 looks strange. Maybe `other`?
Author
Member

Updated.

Updated.
dstepanov-yadro approved these changes 2023-07-06 14:17:53 +00:00
acid-ant force-pushed feature/101-addr-equals from 46826792aa to e88304d61a 2023-07-07 05:47:44 +00:00 Compare
ale64bit approved these changes 2023-07-07 07:08:11 +00:00
fyrchik reviewed 2023-07-07 09:35:52 +00:00
@ -161,0 +162,4 @@
val.IterateUserAttributes(func(key, val string) {
i++
})
require.Equal(t, 1, i)
Owner

May be I am missing something, why is it 1 here?

May be I am missing something, why is it `1` here?
Author
Member
Cause we are adding attribute when initialize container here https://git.frostfs.info/TrueCloudLab/frostfs-sdk-go/src/branch/master/container/test/generate.go#L18
acid-ant force-pushed feature/101-addr-equals from e88304d61a to 6ea2f36441 2023-07-07 10:37:46 +00:00 Compare
acid-ant force-pushed feature/101-addr-equals from 6ea2f36441 to e13edb20cd 2023-07-07 15:31:52 +00:00 Compare
fyrchik merged commit d70ef2187b into master 2023-07-10 09:05:02 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-sdk-go#106
No description provided.