From d704795dcc7b7b3f7a6ec6b798b9323615c390a7 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Thu, 5 Nov 2020 18:35:58 +0300 Subject: [PATCH] [#189] sdk/netmap: Define unspecified clause Signed-off-by: Alex Vanin --- pkg/netmap/clause.go | 4 ++-- pkg/netmap/clause_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/netmap/clause.go b/pkg/netmap/clause.go index 87b4e47..2e0278b 100644 --- a/pkg/netmap/clause.go +++ b/pkg/netmap/clause.go @@ -9,7 +9,7 @@ import ( type Clause uint32 const ( - _ Clause = iota + ClauseUnspecified Clause = iota // ClauseSame is a selector modifier to select only nodes having the same value of bucket attribute. ClauseSame @@ -22,7 +22,7 @@ const ( func ClauseFromV2(c netmap.Clause) Clause { switch c { default: - return 0 + return ClauseUnspecified case netmap.Same: return ClauseSame case netmap.Distinct: diff --git a/pkg/netmap/clause_test.go b/pkg/netmap/clause_test.go index fd3a464..b30d89b 100644 --- a/pkg/netmap/clause_test.go +++ b/pkg/netmap/clause_test.go @@ -13,7 +13,7 @@ func TestClauseFromV2(t *testing.T) { cV2 netmap.Clause }{ { - c: 0, + c: ClauseUnspecified, cV2: netmap.UnspecifiedClause, }, {