package cmd import ( "fmt" "github.com/spf13/cobra" ) func NewCommandPorts() *cobra.Command { spaceCmd := &cobra.Command{ Use: "ports", Short: "работа с пробросом SSH портов", RunE: portsRunE, } return spaceCmd } func portsRunE(_ *cobra.Command, args []string) error { fmt.Println("[dummy] ports") for _, elm := range args { fmt.Printf("- %s\n", elm) } return nil }