@@ -26,8 +26,7 @@ import (
26
26
migrate "github.com/ipfs/go-ipfs/repo/fsrepo/migrations"
27
27
28
28
"github.com/hashicorp/go-multierror"
29
- "github.com/ipfs/go-ipfs-cmdkit"
30
- cmds "github.com/ipfs/go-ipfs-cmds"
29
+ "github.com/ipfs/go-ipfs-cmds"
31
30
mprome "github.com/ipfs/go-metrics-prometheus"
32
31
goprocess "github.com/jbenet/goprocess"
33
32
ma "github.com/multiformats/go-multiaddr"
@@ -62,7 +61,7 @@ const (
62
61
)
63
62
64
63
var daemonCmd = & cmds.Command {
65
- Helptext : cmdkit .HelpText {
64
+ Helptext : cmds .HelpText {
66
65
Tagline : "Run a network-connected IPFS node." ,
67
66
ShortDescription : `
68
67
'ipfs daemon' runs a persistent ipfs daemon that can serve commands
@@ -153,26 +152,26 @@ Headers.
153
152
` ,
154
153
},
155
154
156
- Options : []cmdkit .Option {
157
- cmdkit .BoolOption (initOptionKwd , "Initialize ipfs with default settings if not already initialized" ),
158
- cmdkit .StringOption (initProfileOptionKwd , "Configuration profiles to apply for --init. See ipfs init --help for more" ),
159
- cmdkit .StringOption (routingOptionKwd , "Overrides the routing option" ).WithDefault (routingOptionDefaultKwd ),
160
- cmdkit .BoolOption (mountKwd , "Mounts IPFS to the filesystem" ),
161
- cmdkit .BoolOption (writableKwd , "Enable writing objects (with POST, PUT and DELETE)" ),
162
- cmdkit .StringOption (ipfsMountKwd , "Path to the mountpoint for IPFS (if using --mount). Defaults to config setting." ),
163
- cmdkit .StringOption (ipnsMountKwd , "Path to the mountpoint for IPNS (if using --mount). Defaults to config setting." ),
164
- cmdkit .BoolOption (unrestrictedApiAccessKwd , "Allow API access to unlisted hashes" ),
165
- cmdkit .BoolOption (unencryptTransportKwd , "Disable transport encryption (for debugging protocols)" ),
166
- cmdkit .BoolOption (enableGCKwd , "Enable automatic periodic repo garbage collection" ),
167
- cmdkit .BoolOption (adjustFDLimitKwd , "Check and raise file descriptor limits if needed" ).WithDefault (true ),
168
- cmdkit .BoolOption (migrateKwd , "If true, assume yes at the migrate prompt. If false, assume no." ),
169
- cmdkit .BoolOption (enablePubSubKwd , "Instantiate the ipfs daemon with the experimental pubsub feature enabled." ),
170
- cmdkit .BoolOption (enableIPNSPubSubKwd , "Enable IPNS record distribution through pubsub; enables pubsub." ),
171
- cmdkit .BoolOption (enableMultiplexKwd , "Add the experimental 'go-multiplex' stream muxer to libp2p on construction." ).WithDefault (true ),
155
+ Options : []cmds .Option {
156
+ cmds .BoolOption (initOptionKwd , "Initialize ipfs with default settings if not already initialized" ),
157
+ cmds .StringOption (initProfileOptionKwd , "Configuration profiles to apply for --init. See ipfs init --help for more" ),
158
+ cmds .StringOption (routingOptionKwd , "Overrides the routing option" ).WithDefault (routingOptionDefaultKwd ),
159
+ cmds .BoolOption (mountKwd , "Mounts IPFS to the filesystem" ),
160
+ cmds .BoolOption (writableKwd , "Enable writing objects (with POST, PUT and DELETE)" ),
161
+ cmds .StringOption (ipfsMountKwd , "Path to the mountpoint for IPFS (if using --mount). Defaults to config setting." ),
162
+ cmds .StringOption (ipnsMountKwd , "Path to the mountpoint for IPNS (if using --mount). Defaults to config setting." ),
163
+ cmds .BoolOption (unrestrictedApiAccessKwd , "Allow API access to unlisted hashes" ),
164
+ cmds .BoolOption (unencryptTransportKwd , "Disable transport encryption (for debugging protocols)" ),
165
+ cmds .BoolOption (enableGCKwd , "Enable automatic periodic repo garbage collection" ),
166
+ cmds .BoolOption (adjustFDLimitKwd , "Check and raise file descriptor limits if needed" ).WithDefault (true ),
167
+ cmds .BoolOption (migrateKwd , "If true, assume yes at the migrate prompt. If false, assume no." ),
168
+ cmds .BoolOption (enablePubSubKwd , "Instantiate the ipfs daemon with the experimental pubsub feature enabled." ),
169
+ cmds .BoolOption (enableIPNSPubSubKwd , "Enable IPNS record distribution through pubsub; enables pubsub." ),
170
+ cmds .BoolOption (enableMultiplexKwd , "Add the experimental 'go-multiplex' stream muxer to libp2p on construction." ).WithDefault (true ),
172
171
173
172
// TODO: add way to override addresses. tricky part: updating the config if also --init.
174
- // cmdkit .StringOption(apiAddrKwd, "Address for the daemon rpc API (overrides config)"),
175
- // cmdkit .StringOption(swarmAddrKwd, "Address for the swarm socket (overrides config)"),
173
+ // cmds .StringOption(apiAddrKwd, "Address for the daemon rpc API (overrides config)"),
174
+ // cmds .StringOption(swarmAddrKwd, "Address for the swarm socket (overrides config)"),
176
175
},
177
176
Subcommands : map [string ]* cmds.Command {},
178
177
Run : daemonFunc ,
@@ -384,7 +383,7 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment
384
383
// construct fuse mountpoints - if the user provided the --mount flag
385
384
mount , _ := req .Options [mountKwd ].(bool )
386
385
if mount && offline {
387
- return cmdkit .Errorf (cmdkit .ErrClient , "mount is not currently supported in offline mode" )
386
+ return cmds .Errorf (cmds .ErrClient , "mount is not currently supported in offline mode" )
388
387
}
389
388
if mount {
390
389
if err := mountFuse (req , cctx ); err != nil {
0 commit comments