Skip to content

Commit

Permalink
Rename node to ipfs.
Browse files Browse the repository at this point in the history
  • Loading branch information
lthibault committed Sep 11, 2024
1 parent eabd9ab commit 0e0d7d5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmd/internal/run/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@ func Command() *cli.Command {
}
}

// Global IPFS node. This is usually colocated on the local host,
// Global IPFS ipfs. This is usually colocated on the local host,
// or available on the local network. By default, the setup func
// will search for a local ~/.ipfs directory.
var node iface.CoreAPI
var ipfs iface.CoreAPI

func setup() cli.BeforeFunc {
return func(c *cli.Context) (err error) {
var a ma.Multiaddr
if s := c.String("ipfs"); s == "local" {
node, err = rpc.NewLocalApi()
ipfs, err = rpc.NewLocalApi()
} else if a, err = ma.NewMultiaddr(s); err == nil {
node, err = rpc.NewApiWithClient(a, http.DefaultClient)
ipfs, err = rpc.NewApiWithClient(a, http.DefaultClient)
}

return
Expand All @@ -66,7 +66,7 @@ func run() cli.ActionFunc {
for _, ns := range c.StringSlice("load") {
wetware.Add(ww.Config{
NS: ns,
IPFS: node,
IPFS: ipfs,
Host: h,
}.Build())
}
Expand Down

0 comments on commit 0e0d7d5

Please sign in to comment.