File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -64,10 +64,10 @@ func root(args []string) error {
6464 } else {
6565 qn , err = strconv .Atoi (q )
6666 if err != nil {
67- return fmt .Errorf ("-q should be within [min=1, max=10], please check your env " )
67+ return fmt .Errorf ("-q should be within [min=1, max=10], please check if `GOSO_QUESTIONS` is set correctly " )
6868 }
6969 if qn < 1 || qn > 10 {
70- return fmt .Errorf ("-q should be within [min=1, max=10], please check your env " )
70+ return fmt .Errorf ("-q should be within [min=1, max=10], please check if `GOSO_QUESTIONS` is set correctly " )
7171 }
7272 }
7373 a , set := os .LookupEnv ("GOSO_ANSWERS" )
@@ -76,10 +76,10 @@ func root(args []string) error {
7676 } else {
7777 an , err = strconv .Atoi (a )
7878 if err != nil {
79- return fmt .Errorf ("-a should be within [min=1, max=10], please check your env " )
79+ return fmt .Errorf ("-a should be within [min=1, max=10], please check if `GOSO_ANSWERS` is set correctly " )
8080 }
8181 if an < 1 || an > 10 {
82- return fmt .Errorf ("-a should be within [min=1, max=10], please check your env " )
82+ return fmt .Errorf ("-a should be within [min=1, max=10], please check if `GOSO_ANSWERS` is set correctly " )
8383 }
8484 }
8585 flags := flag .NewFlagSet (app , flag .ExitOnError )
Original file line number Diff line number Diff line change @@ -329,7 +329,7 @@ func FetchGoogle(conf *Config) (*GoogleSearchResult, error) {
329329 }
330330 res , err := conf .Client .Do (req )
331331 if err != nil {
332- return nil , err
332+ return nil , fmt . Errorf ( "failed connecting to Google API: check you internet connection" )
333333 }
334334 defer res .Body .Close ()
335335 if res .StatusCode > 299 {
You can’t perform that action at this time.
0 commit comments