mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Remove some panics, replace with error percolation
This commit is contained in:
committed by
Chris Cummer
parent
04c3effcea
commit
0472e8edec
@@ -8,7 +8,7 @@ import (
|
||||
func Request(apiKey string, apiURL string) ([]byte, error) {
|
||||
req, err := http.NewRequest("GET", apiURL, nil)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
req.SetBasicAuth(apiKey, "x")
|
||||
|
||||
Reference in New Issue
Block a user