feat(2/init) expose init with defaults
will support daemon initialization License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com> # TYPES # feat # fix # docs # style (formatting, missing semi colons, etc; no code change): # refactor # test (adding missing tests, refactoring tests; no production code change) # chore (updating grunt tasks etc; no production code change) Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
Brian Tiger Chow committed
Nov 16, 2014 at 13:18 UTC
d0a3f9ba9ab54314d7f1a65663b06afc2757bd69
1 file changed
+5
-1
cmd/ipfs2/init.go
+5
-1
@@ -82,7 +82,11 @@ IPFS and are now interfacing with the ipfs merkledag!
82
For a short demo of what you can do, enter 'ipfs tour'
83
`
84
85
-// NB: if dspath is not provided, it will be retrieved from the config
85
+func initWithDefaults(configRoot string) error {
86
+ _, err := doInit(configRoot, "", false, nBitsForKeypairDefault)
87
+ return errors.Wrap(err)
88
+}
89
+
90
func doInit(configRoot string, dspathOverride string, force bool, nBitsForKeypair int) (interface{}, error) {
91
92
u.POut("initializing ipfs node at %s\n", configRoot)