Ver Fonte

Add an error message on Get failures

Signed-off-by: Antoine Tenart <antoine.tenart@ack.tf>
Antoine Tenart há 3 anos atrás
pai
commit
008601ab8b
1 ficheiros alterados com 1 adições e 0 exclusões
  1. 1 0
      main.go

+ 1 - 0
main.go

@@ -97,6 +97,7 @@ func fetch(url string) (string, error) {
 	}
 	req, err := client.Get(url)
 	if err != nil {
+		fmt.Printf("Could not fetch %s: %s\n", url, err)
 		return "", err
 	}
 	defer req.Body.Close()