mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-27 05:17:49 +08:00
local node construction
This commit is contained in:
parent
8223fb22ca
commit
d04b09c136
12
cli/ipfs.go
12
cli/ipfs.go
@ -4,6 +4,8 @@ import (
|
||||
"fmt"
|
||||
"github.com/gonuts/flag"
|
||||
"github.com/jbenet/commander"
|
||||
config "github.com/jbenet/go-ipfs/config"
|
||||
core "github.com/jbenet/go-ipfs/core"
|
||||
u "github.com/jbenet/go-ipfs/util"
|
||||
"os"
|
||||
)
|
||||
@ -56,3 +58,13 @@ func main() {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func localNode() (*core.IpfsNode, error) {
|
||||
//todo implement config file flag
|
||||
cfg, err := config.LoadConfig("")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return core.NewIpfsNode(cfg)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user