cmd

package
v0.12.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "ecsy",
	Short: "Helper tools for Amazon's Elastic Container Service",
	Long:  `Wraps the ECS SDK in a more user-friendly (for me at least) way`,
}

RootCmd represents the base command when called without any subcommands

Functions

func AskForConfirmation added in v0.0.7

func AskForConfirmation(s string) bool

AskForConfirmation asks the user for confirmation. A user must type in "yes" or "no" and then press enter. It has fuzzy matching, so "y", "Y", "yes", "YES", and "Yes" all count as confirmations. If the input is not recognized, it will ask again. The function does not return until it gets a valid response from the user.

func EditStringBlock added in v0.0.7

func EditStringBlock(input string) (output string, err error)

EditStringBlock delegates the editing of a string block to an editor of choice, similar to git commit, or git rebase

func Execute

func Execute()

Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func ServiceChooser added in v0.0.10

func ServiceChooser(args []string) (string, string)

ServiceChooser enforces an arguments array have a cluster and service if it does not, it will search and prompt

func StringChooser

func StringChooser(options []string, title string) string

StringChooser asks a user to pick from a series of strings

func Validate2ArgumentsCount added in v0.0.7

func Validate2ArgumentsCount(cmd *cobra.Command, args []string) error

Validate2ArgumentsCount simply validates that there are two arguments

func Validate4ArgumentsCount added in v0.2.6

func Validate4ArgumentsCount(cmd *cobra.Command, args []string) error

Validate4ArgumentsCount simply validates that there are two arguments

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL