提交 bc396610 作者: Brian Tiger Chow 提交者: Juan Batiz-Benet

fix(2/daemon) initialized --> init

@jbenet

License: MIT
Signed-off-by: 's avatarBrian Tiger Chow <brian@perfmode.com>
上级 94bfc812
......@@ -17,7 +17,7 @@ import (
)
const (
initializedOptionKeyword = "initialized"
initOptionKwd = "init"
)
var daemonCmd = &cmds.Command{
......@@ -33,7 +33,7 @@ the daemon.
},
Options: []cmds.Option{
cmds.BoolOption(initializedOptionKeyword, "Initialize IPFS with default settings if not already initialized"),
cmds.BoolOption(initOptionKwd, "Initialize IPFS with default settings if not already initialized"),
},
Subcommands: map[string]*cmds.Command{},
Run: daemonFunc,
......@@ -41,11 +41,11 @@ the daemon.
func daemonFunc(req cmds.Request) (interface{}, error) {
init, _, err := req.Option(initializedOptionKeyword).Bool()
initialize, _, err := req.Option(initOptionKwd).Bool()
if err != nil {
return nil, err
}
if init {
if initialize {
// now, FileExists is our best method of detecting whether IPFS is
// configured. Consider moving this into a config helper method
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论