github.com/bytom/bytom@v1.1.2-0.20221014091027-bbcba3df6075/cmd/bytomcli/commands/net.go (about) 1 package commands 2 3 import ( 4 "os" 5 6 "github.com/spf13/cobra" 7 8 "github.com/bytom/bytom/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 }