1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-10 05:52:20 +08:00

use already created config in daemon.go

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
This commit is contained in:
Jeromy
2015-09-03 12:07:07 -07:00
parent ab0c668ab8
commit 71d2ab1fc9
2 changed files with 15 additions and 7 deletions

View File

@ -204,13 +204,7 @@ func daemonFunc(req cmds.Request, res cmds.Response) {
return
}
if routingOption == routingOptionSupernodeKwd {
rcfg, err := repo.Config()
if err != nil {
res.SetError(err, cmds.ErrNormal)
return
}
servers, err := rcfg.SupernodeRouting.ServerIPFSAddrs()
servers, err := cfg.SupernodeRouting.ServerIPFSAddrs()
if err != nil {
res.SetError(err, cmds.ErrNormal)
repo.Close() // because ownership hasn't been transferred to the node

14
util/sadhack/godep.go Normal file
View File

@ -0,0 +1,14 @@
package util
// FIXME: we need the go-random/random utility for our sharness test wich depends on go-humanize
// Godep will drop it if we dont use it in ipfs. There should be a better way to do this.
import _ "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/dustin/go-humanize"
// similar to the above, only used in the tests makefile
import _ "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/whyrusleeping/iptb"
import _ "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/chriscool/go-sleep"
// imported by chegga/pb on windows, this is here so running godeps on non-windows doesnt
// drop it from our vendoring
import _ "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/olekukonko/ts"