github.com/saucelabs/saucectl@v0.175.1/internal/cmd/signup/cmd.go (about) 1 package signup 2 3 import ( 4 "fmt" 5 "os" 6 7 "github.com/rs/zerolog/log" 8 "github.com/spf13/cobra" 9 ) 10 11 var ( 12 runUse = "signup" 13 runShort = "Signup for Sauce Labs" 14 runLong = "Provide a web link for free trial signup" 15 runExample = "saucectl signup" 16 ) 17 18 // Command creates the `run` command 19 func Command() *cobra.Command { 20 cmd := &cobra.Command{ 21 Use: runUse, 22 Short: runShort, 23 Long: runLong, 24 Example: runExample, 25 SilenceUsage: true, 26 Run: func(cmd *cobra.Command, args []string) { 27 log.Info().Msg("Start Signup Command") 28 err := Run() 29 if err != nil { 30 log.Err(err).Msg("failed to execute run command") 31 os.Exit(1) 32 } 33 }, 34 } 35 return cmd 36 } 37 38 // Run runs the command 39 func Run() error { 40 signupMessage := ` 41 Achieve digital confidence with the Sauce Labs Testrunner Toolkit 42 43 View and analyze test results online with a free Sauce Labs account: 44 https://bit.ly/saucectl-signup` 45 46 fmt.Println(signupMessage) 47 return nil 48 }