diff --git a/cmd/saw.go b/cmd/saw.go index 8915a45..6bc0946 100644 --- a/cmd/saw.go +++ b/cmd/saw.go @@ -5,14 +5,14 @@ import ( "github.com/spf13/cobra" ) -var sawCommand = &cobra.Command{ +// SawCommand is the main top-level command +var SawCommand = &cobra.Command{ Use: "saw ", Short: "A fast, multipurpose tool for AWS CloudWatch Logs", - Long: "Saw is a fast, multipurpose tool for cutting through AWS CloudWatch Logs.", - Example: ` saw version - saw groups --prefix prod - saw streams production --prefix api - saw watch production --prefix api --filter error`, + Long: "Saw is a fast, multipurpose tool for AWS CloudWatch Logs.", + Example: ` saw groups + saw streams production + saw watch production`, Run: func(cmd *cobra.Command, args []string) { cmd.HelpFunc()(cmd, args) }, @@ -21,11 +21,11 @@ var sawCommand = &cobra.Command{ var awsConfig config.AWSConfiguration func init() { - sawCommand.AddCommand(groupsCommand) - sawCommand.AddCommand(streamsCommand) - sawCommand.AddCommand(versionCommand) - sawCommand.AddCommand(watchCommand) - sawCommand.AddCommand(getCommand) - sawCommand.PersistentFlags().StringVar(&awsConfig.Region, "region", "", "override profile AWS region") - sawCommand.PersistentFlags().StringVar(&awsConfig.Profile, "profile", "", "override default AWS profile") + SawCommand.AddCommand(groupsCommand) + SawCommand.AddCommand(streamsCommand) + SawCommand.AddCommand(versionCommand) + SawCommand.AddCommand(watchCommand) + SawCommand.AddCommand(getCommand) + SawCommand.PersistentFlags().StringVar(&awsConfig.Region, "region", "", "override profile AWS region") + SawCommand.PersistentFlags().StringVar(&awsConfig.Profile, "profile", "", "override default AWS profile") }