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) { command, err := cmd.Flags().GetString("command") if err != nil { log.Fatalln(err) } wait, err := cmd.Flags().GetInt("wait") if err != nil { log.Fatalln(err) } inputFile, err := cmd.Flags().GetString("input-file") if err != nil { log.Fatalln(err) } var input inputfile.ExecInputFile if inputFile != "" { file, err := os.Open(inputFile) if err != nil { log.Fatalln("Error opening file:", err) } defer file.Close() jsonData, err := io.ReadAll(file) if err != nil { log.Fatalln("Error reading file:", err) } err = json.Unmarshal(jsonData, &input) if err != nil { log.Fatalln("Error decoding JSON:", err) } } err = handler.ExecHandler(command, wait, input.Cluster, input.Service) if err != nil { log.Fatalln(err) } }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.