package cmd

import (
	"fmt"

	"bitbucket.org/robert2206/automation/modules/docker"
	"github.com/urfave/cli"
)

// APICmd is a cli command to manage settings
var APICmd = cli.Command{
	Name:   "api",
	Action: runAPI,
	Flags: []cli.Flag{
		cli.StringFlag{
			Name:  "host",
			Value: "127.0.0.1",
		},
		cli.StringFlag{
			Name:  "port",
			Value: "8080",
		},
	},
}

func runAPI(ctx *cli.Context) error {
	ctrs, _ := docker.GetAllPublicPorts()
	fmt.Println(ctrs)
	return nil
}
