1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-26 15:42:21 +08:00

Merge pull request #5205 from spartucus/patch-1

Refactor code
This commit is contained in:
Whyrusleeping
2018-07-16 16:52:58 +02:00
committed by GitHub

View File

@ -18,7 +18,7 @@ import (
oldcmds "github.com/ipfs/go-ipfs/commands"
core "github.com/ipfs/go-ipfs/core"
coreCmds "github.com/ipfs/go-ipfs/core/commands"
corecmds "github.com/ipfs/go-ipfs/core/commands"
corehttp "github.com/ipfs/go-ipfs/core/corehttp"
loader "github.com/ipfs/go-ipfs/plugin/loader"
repo "github.com/ipfs/go-ipfs/repo"
@ -233,7 +233,7 @@ func commandShouldRunOnDaemon(details cmdDetails, req *cmds.Request, cctx *oldcm
// to this point so that we don't check unnecessarily
// did user specify an api to use for this command?
apiAddrStr, _ := req.Options[coreCmds.ApiOption].(string)
apiAddrStr, _ := req.Options[corecmds.ApiOption].(string)
client, err := getApiClient(cctx.ConfigRoot, apiAddrStr)
if err == repo.ErrApiNotRunning {