[#1454] Upgrade NeoFS SDK Go module with new IDs
Core changes: * avoid package-colliding variable naming * avoid using pointers to IDs where unnecessary * avoid using `idSDK` import alias pattern * use `EncodeToString` for protocol string calculation and `String` for printing Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
cc6209e8a0
commit
1c30414a6c
218 changed files with 2095 additions and 2521 deletions
|
@ -10,15 +10,12 @@ import (
|
|||
)
|
||||
|
||||
type protoMessage interface {
|
||||
StableMarshal([]byte) ([]byte, error)
|
||||
StableMarshal([]byte) []byte
|
||||
proto.Message
|
||||
}
|
||||
|
||||
func testStableMarshal(t *testing.T, m1, m2 protoMessage, cmp func(m1, m2 protoMessage) bool) {
|
||||
data, err := m1.StableMarshal(nil)
|
||||
require.NoError(t, err)
|
||||
|
||||
require.NoError(t, proto.Unmarshal(data, m2))
|
||||
require.NoError(t, proto.Unmarshal(m1.StableMarshal(nil), m2))
|
||||
|
||||
require.True(t, cmp(m1, m2))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue