Skip to content

Commit

Permalink
remove panic
Browse files Browse the repository at this point in the history
  • Loading branch information
Songmu committed May 31, 2015
1 parent b5b88b5 commit 16654cd
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions mackerel/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@ func NewAPI(rawurl string, apiKey string, verbose bool) (*API, error) {
}

func (api *API) urlFor(path string) *url.URL {
newURL, err := url.Parse(api.BaseURL.String())
if err != nil {
panic("invalid url passed")
}

newURL, _ := url.Parse(api.BaseURL.String())
newURL.Path = path
return newURL
}
Expand Down

0 comments on commit 16654cd

Please sign in to comment.