Exemplo n.º 1
0
func NodeInfoCmd(c *cli.Context, client drone.Client) error {
	id, err := strconv.ParseInt(c.Args().Get(0), 0, 64)
	if err != nil {
		return fmt.Errorf("Invalid or missing node id. Must be an integer")
	}

	node, err := client.Node(id)
	if err != nil {
		return fmt.Errorf("Endpoint is not yet supported")
	}
	fmt.Println(node.Addr)
	return nil
}