Skip to content

Commit

Permalink
make fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Villaquiranm committed Dec 23, 2024
1 parent 0c547c3 commit e822ae5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
5 changes: 3 additions & 2 deletions examples/gno.land/p/demo/testutils/crypto_test.gno
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package testutils

import (
"fmt"
"testing"

"gno.land/p/demo/uassert"
)

func TestTestAddress(t *testing.T) {
testAddr := TestAddress("author1")
uassert.Equal(t, "g1v96hg6r0wgc47h6lta047h6lta047h6lm33tq6", string(testAddr))
}
}
2 changes: 1 addition & 1 deletion gnovm/stdlibs/crypto/bech32/bech32_test.gno
Original file line number Diff line number Diff line change
Expand Up @@ -688,4 +688,4 @@ func BenchmarkConvertBitsUp(b *testing.B) {
b.Fatalf("error converting bits: %v", err)
}
}
}
}
12 changes: 6 additions & 6 deletions gnovm/stdlibs/crypto/bech32/error.gno
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ func (e ErrInvalidLength) Error() string {
type ErrInvalidCharacter rune

func (e ErrInvalidCharacter) Error() string {
return "invalid character in string: "+ string(e)
return "invalid character in string: " + string(e)
}

// ErrInvalidSeparatorIndex is returned when the separator character '1' is
// in an invalid position in the bech32 string.
type ErrInvalidSeparatorIndex int

func (e ErrInvalidSeparatorIndex) Error() string {
return "invalid separator index"+ string(e)
return "invalid separator index" + string(e)
}

// ErrNonCharsetChar is returned when a character outside of the specific
Expand All @@ -70,14 +70,14 @@ type ErrInvalidChecksum struct {
}

func (e ErrInvalidChecksum) Error() string {
return "invalid checksum (expected (bech32="+e.Expected+
" bech32m=)"+e.ExpectedM +", got "+ e.Actual+ ")"
return "invalid checksum (expected (bech32=" + e.Expected +
" bech32m=)" + e.ExpectedM + ", got " + e.Actual + ")"
}

// ErrInvalidDataByte is returned when a byte outside the range required for
// conversion into a string was found.
type ErrInvalidDataByte byte

func (e ErrInvalidDataByte) Error() string {
return "invalid data byte: "+ string(e)
}
return "invalid data byte: " + string(e)
}
2 changes: 1 addition & 1 deletion gnovm/stdlibs/crypto/bech32/version.gno
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ var VersionToConsts = map[Version]ChecksumConst{
var ConstsToVersion = map[ChecksumConst]Version{
Version0Const: Version0,
VersionMConst: VersionM,
}
}

0 comments on commit e822ae5

Please sign in to comment.