root.go (607B)
1 package cmd 2 3 import ( 4 "fmt" 5 "os" 6 7 "github.com/spf13/cobra" 8 ) 9 10 var rootCmd = &cobra.Command{ 11 Use: "wrds-dl", 12 Short: "WRDS data browser and downloader", 13 Long: `wrds is a CLI/TUI tool for navigating and downloading data 14 from the Wharton Research Data Services (WRDS) PostgreSQL database. 15 16 Authentication is read from standard PostgreSQL environment variables: 17 PGHOST, PGPORT, PGUSER, PGPASSWORD, PGDATABASE 18 19 Or from ~/.pgpass if PGPASSWORD is not set.`, 20 } 21 22 // Execute runs the root command. 23 func Execute() { 24 if err := rootCmd.Execute(); err != nil { 25 fmt.Fprintln(os.Stderr, err) 26 os.Exit(1) 27 } 28 }