exec

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExecCmd = &cobra.Command{
	Use:   "exec",
	Short: "like ecs execute-command",
	Run: func(cmd *cobra.Command, args []string) {
		var execInput input.ExecInput

		inputFile, err := cmd.Flags().GetString(inputFileName)
		if err != nil {
			log.Fatalln(err)
		}

		if inputFile != "" {
			input.ReadInputFile(&execInput, inputFile)
		}

		if execInput.Cmd == "" {
			command, err := cmd.Flags().GetString(cmdName)
			if err != nil {
				log.Fatalln(err)
			}

			execInput.Cmd = command
		}

		if execInput.Wait == 0 {
			wait, err := cmd.Flags().GetInt("wait")
			if err != nil {
				log.Fatalln(err)
			}

			execInput.Wait = wait
		}

		err = handler.ExecHandler(execInput)
		if err != nil {
			log.Fatalln(err)
		}
	},
}
View Source
var MakeInputFileCmd = &cobra.Command{
	Use:   "make-input-file",
	Short: "make input file skelton for exec",
	Run: func(cmd *cobra.Command, args []string) {
		input.MakeInputFile(input.ExecInput{}, "exec-input.json")
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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