forked from TrueCloudLab/frostfs-sdk-go
[#101] Add Equals
for Address
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
863be6034f
commit
ac95b87e7c
1 changed files with 8 additions and 0 deletions
|
@ -169,3 +169,11 @@ func (x *Address) DecodeString(s string) error {
|
|||
func (x Address) String() string {
|
||||
return x.EncodeToString()
|
||||
}
|
||||
|
||||
// Equals defines a comparison relation between two Address's instances.
|
||||
//
|
||||
// Note that comparison using '==' operator is not recommended since it MAY result
|
||||
// in loss of compatibility.
|
||||
func (x Address) Equals(other Address) bool {
|
||||
return x.obj.Equals(other.obj) && x.cnr.Equals(other.cnr)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue