File tree Expand file tree Collapse file tree 2 files changed +7
-16
lines changed
Expand file tree Collapse file tree 2 files changed +7
-16
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import (
1010 "fmt"
1111 "math"
1212
13- b58 "github.com/jbenet/go- base58"
13+ b58 "github.com/mr-tron/base58/ base58"
1414)
1515
1616// errors
@@ -197,17 +197,8 @@ func (m Multihash) B58String() string {
197197
198198// FromB58String parses a B58-encoded multihash.
199199func FromB58String (s string ) (m Multihash , err error ) {
200- // panic handler, in case we try accessing bytes incorrectly.
201- defer func () {
202- if e := recover (); e != nil {
203- m = Multihash {}
204- err = e .(error )
205- }
206- }()
207-
208- //b58 smells like it can panic...
209- b := b58 .Decode (s )
210- if len (b ) == 0 {
200+ b , err := b58 .Decode (s )
201+ if err != nil {
211202 return Multihash {}, ErrInvalidMultihash
212203 }
213204
Original file line number Diff line number Diff line change 1414 "version" : " 0.0.0"
1515 },
1616 {
17- "author" : " whyrusleeping " ,
18- "hash" : " QmT8rehPR3F6bmwL6zjUN8XpiDBFFpMP2myPdC6ApsWfJf " ,
19- "name" : " go-base58" ,
20- "version" : " 0.0.0 "
17+ "author" : " mr-tron " ,
18+ "hash" : " QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY " ,
19+ "name" : " go-base58-fast " ,
20+ "version" : " 0.1.1 "
2121 },
2222 {
2323 "author" : " whyrusleeping" ,
You can’t perform that action at this time.
0 commit comments