mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
swarm/api: Println had %s but no substitution
This commit is contained in:
parent
b7fc34045d
commit
4ec6216dfb
1 changed files with 16 additions and 0 deletions
|
|
@ -99,7 +99,23 @@ func (self *Api) Resolve(uri *URI) (storage.Key, error) {
|
||||||
return storage.Key(common.Hex2Bytes(uri.Addr)), nil
|
return storage.Key(common.Hex2Bytes(uri.Addr)), nil
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
<<<<<<< HEAD
|
||||||
return nil, fmt.Errorf("'%s' does not resolve: %v but is not a content hash", uri.Addr, err)
|
return nil, fmt.Errorf("'%s' does not resolve: %v but is not a content hash", uri.Addr, err)
|
||||||
|
=======
|
||||||
|
return nil, fmt.Errorf("'%s' does not resolve: %v but is not a content hash", hostPort, err)
|
||||||
|
}
|
||||||
|
return nil, fmt.Errorf("'%s' is not a content hash", hostPort)
|
||||||
|
}
|
||||||
|
|
||||||
|
func Parse(uri string) (hostPort, path string) {
|
||||||
|
if uri == "" {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
parts := slashes.Split(uri, 3)
|
||||||
|
var i int
|
||||||
|
if len(parts) == 0 {
|
||||||
|
return
|
||||||
|
>>>>>>> swarm/api: Println had %s but no substitution
|
||||||
}
|
}
|
||||||
return nil, fmt.Errorf("'%s' is not a content hash", uri.Addr)
|
return nil, fmt.Errorf("'%s' is not a content hash", uri.Addr)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue