OSDN Git Service

Merge pull request #41 from Bytom/dev
[bytom/vapor.git] / cmd / vaporcli / commands / net.go
1 package commands
2
3 import (
4         "os"
5
6         "github.com/spf13/cobra"
7
8         "github.com/vapor/util"
9 )
10
11 var netInfoCmd = &cobra.Command{
12         Use:   "net-info",
13         Short: "Print the summary of network",
14         Args:  cobra.NoArgs,
15         Run: func(cmd *cobra.Command, args []string) {
16                 data, exitCode := util.ClientCall("/net-info")
17                 if exitCode != util.Success {
18                         os.Exit(exitCode)
19                 }
20                 printJSON(data)
21         },
22 }