refactor: move multibase to its own subpackage
This commit is contained in:
parent
c44c11d264
commit
834c964892
|
@ -1,4 +1,4 @@
|
|||
package cid
|
||||
package multibase
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
@ -30,7 +30,7 @@ type Multibase interface {
|
|||
|
||||
var _ Multibase = (*multibaseImpl)(nil)
|
||||
|
||||
func NewMultibase(encoder Encoder) Multibase {
|
||||
func New(encoder Encoder) Multibase {
|
||||
return &multibaseImpl{encoder: encoder}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package cid
|
||||
package multibase
|
||||
|
||||
import (
|
||||
"git.lumeweb.com/LumeWeb/libs5-go/internal/testdata"
|
||||
|
@ -17,7 +17,7 @@ func (e *encoder) ToBytes() []byte {
|
|||
|
||||
func newEncoder(data []byte) encoder {
|
||||
e := &encoder{data: data}
|
||||
m := NewMultibase(e)
|
||||
m := New(e)
|
||||
e.Multibase = m
|
||||
|
||||
return *e
|
Loading…
Reference in New Issue