[#1693] util: Replace conditional panics with asserts
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m29s
Build / Build Components (push) Successful in 2m11s
Pre-commit hooks / Pre-commit (push) Successful in 2m22s
Tests and linters / gopls check (push) Successful in 4m9s
Tests and linters / Run gofumpt (push) Successful in 4m26s
Tests and linters / Staticcheck (push) Successful in 5m1s
Tests and linters / Lint (push) Successful in 5m10s
Tests and linters / Tests (push) Successful in 5m23s
Tests and linters / Tests with -race (push) Successful in 5m56s
OCI image / Build container images (push) Successful in 4m12s
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m29s
Build / Build Components (push) Successful in 2m11s
Pre-commit hooks / Pre-commit (push) Successful in 2m22s
Tests and linters / gopls check (push) Successful in 4m9s
Tests and linters / Run gofumpt (push) Successful in 4m26s
Tests and linters / Staticcheck (push) Successful in 5m1s
Tests and linters / Lint (push) Successful in 5m10s
Tests and linters / Tests (push) Successful in 5m23s
Tests and linters / Tests with -race (push) Successful in 5m56s
OCI image / Build container images (push) Successful in 4m12s
Change-Id: I13b566cde3e6d43d8a75aa2e9b28e63b597adff9 Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
This commit is contained in:
parent
5dd8d7e87a
commit
e45382b0c1
1 changed files with 2 additions and 3 deletions
|
@ -6,6 +6,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"text/tabwriter"
|
"text/tabwriter"
|
||||||
|
|
||||||
|
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/assert"
|
||||||
"github.com/mr-tron/base58"
|
"github.com/mr-tron/base58"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/crypto/hash"
|
"github.com/nspcc-dev/neo-go/pkg/crypto/hash"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
||||||
|
@ -104,9 +105,7 @@ func (d Dashboard) PrettyPrint(uncompressed, useHex bool) {
|
||||||
|
|
||||||
func base58ToHex(data string) string {
|
func base58ToHex(data string) string {
|
||||||
val, err := base58.Decode(data)
|
val, err := base58.Decode(data)
|
||||||
if err != nil {
|
assert.NoError(err, "produced incorrect base58 value")
|
||||||
panic("produced incorrect base58 value")
|
|
||||||
}
|
|
||||||
|
|
||||||
return hex.EncodeToString(val)
|
return hex.EncodeToString(val)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue