github.com/shrimpyuk/bor@v0.2.15-0.20220224151350-fb4ec6020bae/internal/cli/peers.go (about)

     1  package cli
     2  
     3  import (
     4  	"github.com/mitchellh/cli"
     5  )
     6  
     7  // PeersCommand is the command to group the peers commands
     8  type PeersCommand struct {
     9  	UI cli.Ui
    10  }
    11  
    12  // Help implements the cli.Command interface
    13  func (c *PeersCommand) Help() string {
    14  	return `Usage: bor peers <subcommand>
    15  
    16    This command groups actions to interact with peers.
    17  	
    18    List the connected peers:
    19    
    20      $ bor peers list
    21  	
    22    Add a new peer by enode:
    23    
    24      $ bor peers add <enode>
    25  
    26    Remove a connected peer by enode:
    27  
    28      $ bor peers remove <enode>
    29  
    30    Display information about a peer:
    31  
    32      $ bor peers status <peer id>`
    33  }
    34  
    35  // Synopsis implements the cli.Command interface
    36  func (c *PeersCommand) Synopsis() string {
    37  	return "Interact with peers"
    38  }
    39  
    40  // Run implements the cli.Command interface
    41  func (c *PeersCommand) Run(args []string) int {
    42  	return cli.RunResultHelp
    43  }