Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "athenai", Short: "Athenai is a simple and easy-to-use command line tool that runs SQL statements on Amazon Athena.", Long: `Athenai is a simple and easy-to-use command line tool that runs SQL statements on Amazon Athena. With Athenai you can easily run multiple queries at a time on Amazon Athena and see the results in table or CSV format once the executions are complete.`, PersistentPreRunE: func(cmd *cobra.Command, args []string) error { log.SetFlags(log.LstdFlags | log.Lmicroseconds | log.Lshortfile) if !config.Debug { log.SetOutput(ioutil.Discard) } log.Println("Athenai version:", commandVersion) initConfig(config, cfgFile, cmd, os.Args[1:]) log.Printf("Initialized Config: %#v\n", config) if config.Output != "" { file, err := os.Create(config.Output) if err != nil { return errors.Wrap(err, "failed to open file to write") } log.Printf("Setting output to %s\n", file.Name()) stdout = file } return nil }, Run: func(cmd *cobra.Command, args []string) { if showVersion { fmt.Fprintln(stdout, commandVersion) } else { cmd.Help() } }, PersistentPostRunE: func(cmd *cobra.Command, args []string) error { return stdout.Close() }, }
RootCmd represents the base command when called without any subcommands
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.