mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
replace log.Fatalln with log.Error
This commit is contained in:
parent
719213b25e
commit
21ee59eb7e
3 changed files with 6 additions and 6 deletions
|
@ -31,7 +31,7 @@ func FirstLine(streamer string, username string) (string, error) {
|
|||
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
log.Error(err)
|
||||
}
|
||||
|
||||
var responseObject firstLineApiResponse
|
||||
|
|
|
@ -45,7 +45,7 @@ func Subage(username string, streamer string) (string, error) {
|
|||
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
log.Error(err)
|
||||
}
|
||||
|
||||
var responseObject subageApiResponse
|
||||
|
|
|
@ -11,11 +11,11 @@ import (
|
|||
func RandomNumber() string {
|
||||
response, err := http.Get("http://numbersapi.com/random/trivia")
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
log.Error(err)
|
||||
}
|
||||
responseData, err := ioutil.ReadAll(response.Body)
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
log.Error(err)
|
||||
}
|
||||
|
||||
return string(responseData)
|
||||
|
@ -24,11 +24,11 @@ func RandomNumber() string {
|
|||
func Number(number string) string {
|
||||
response, err := http.Get(fmt.Sprint("http://numbersapi.com/" + string(number)))
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
log.Error(err)
|
||||
}
|
||||
responseData, err := ioutil.ReadAll(response.Body)
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
log.Error(err)
|
||||
}
|
||||
return string(responseData)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue