1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-15 19:37:28 +08:00

RPC Address init + checks

This commit is contained in:
Juan Batiz-Benet
2014-09-21 03:38:09 -07:00
committed by Brian Tiger Chow
parent 1653304129
commit 81b4b38140
2 changed files with 10 additions and 1 deletions

View File

@ -3,6 +3,7 @@
package main
import (
"errors"
"fmt"
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/gonuts/flag"
@ -44,6 +45,11 @@ func mountCmd(c *commander.Command, inp []string) error {
return err
}
// launch the RPC endpoint.
if n.Config.RPCAddress == "" {
return errors.New("no config.RPCAddress endpoint supplied")
}
maddr, err := ma.NewMultiaddr(n.Config.RPCAddress)
if err != nil {
return err