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:
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")
|
||||
|
@ -86,7 +86,7 @@ func (widget *Widget) contentFrom(deploys []nr.ApplicationDeployment) string {
|
||||
}
|
||||
|
||||
str = str + fmt.Sprintf(
|
||||
" [green]%s[%s] %s %-16s[white]\n",
|
||||
" [green]%s[%s] %s %-.16s[white]\n",
|
||||
deploy.Revision[0:8],
|
||||
lineColor,
|
||||
deploy.Timestamp.Format("Jan 02, 15:04 MST"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user