Skip to content

Commit

Permalink
Move from codegangsta to urfave/cli; fix for cli.Action deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
pkrnjevic committed Jun 7, 2016
1 parent be524af commit 097c7a9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"errors"
"fmt"
"github.com/codegangsta/cli"
"github.com/urfave/cli"
"github.com/meshbird/meshbird/common"
"github.com/meshbird/meshbird/log"
"github.com/meshbird/meshbird/secure"
Expand Down Expand Up @@ -81,7 +81,7 @@ func main() {
}
}

func actionGetIP(ctx *cli.Context) {
func actionGetIP(ctx *cli.Context) error {
if NetworkKey == "" {
log.Fatal(keyNotSetError.Error())
}
Expand All @@ -96,9 +96,10 @@ func actionGetIP(ctx *cli.Context) {

fmt.Println(state.PrivateIP.String())
log.Info("private IP %q restored successfully", state.PrivateIP.String())
return err
}

func actionNew(ctx *cli.Context) {
func actionNew(ctx *cli.Context) error {
var secret *secure.NetworkSecret
var err error

Expand All @@ -116,9 +117,10 @@ func actionNew(ctx *cli.Context) {
secret = secure.NewNetworkSecret(ipNet)
}
fmt.Println(secret.Marshal())
return err
}

func actionJoin(ctx *cli.Context) {
func actionJoin(ctx *cli.Context) error {
if NetworkKey == "" {
log.Fatal(keyNotSetError.Error())
}
Expand Down Expand Up @@ -147,4 +149,5 @@ func actionJoin(ctx *cli.Context) {
}

node.WaitStop()
return err
}

0 comments on commit 097c7a9

Please sign in to comment.