fix: need to export Encoder for test cases

This commit is contained in:
Derrick Hammer 2024-01-04 10:08:13 -05:00
parent e6034b9aae
commit 026a7dc10e
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 7 additions and 7 deletions

View File

@ -95,7 +95,7 @@ func (c EncryptedCID) MarshalJSON() ([]byte, error) {
if err != nil {
return nil, err
}
// Delegate to the MarshalJSON method of the encoder
// Delegate to the MarshalJSON method of the Encoder
return json.Marshal(str)
}

View File

@ -17,7 +17,7 @@ type Encoder interface {
type multibaseImpl struct {
Multibase
encoder Encoder
Encoder Encoder
}
type Multibase interface {
@ -31,7 +31,7 @@ type Multibase interface {
var _ Multibase = (*multibaseImpl)(nil)
func NewMultibase(encoder Encoder) Multibase {
return &multibaseImpl{encoder: encoder}
return &multibaseImpl{Encoder: encoder}
}
func MultibaseDecodeString(data string) (bytes []byte, err error) {
@ -52,19 +52,19 @@ func MultibaseDecodeString(data string) (bytes []byte, err error) {
}
func (m *multibaseImpl) ToHex() (string, error) {
return bases.ToHex(m.encoder.ToBytes())
return bases.ToHex(m.Encoder.ToBytes())
}
func (m *multibaseImpl) ToBase32() (string, error) {
return bases.ToBase32(m.encoder.ToBytes())
return bases.ToBase32(m.Encoder.ToBytes())
}
func (m *multibaseImpl) ToBase64Url() (string, error) {
return bases.ToBase64Url(m.encoder.ToBytes())
return bases.ToBase64Url(m.Encoder.ToBytes())
}
func (m *multibaseImpl) ToBase58() (string, error) {
return bases.ToBase58BTC(m.encoder.ToBytes())
return bases.ToBase58BTC(m.Encoder.ToBytes())
}
func (m *multibaseImpl) ToString() (string, error) {