Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Commit

Permalink
Remove timeout pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed May 5, 2019
1 parent 8f2b7e6 commit 7d4820a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func main() {
os.Exit(0)
}

client := volkszaehler.NewClient(*apiURL, apiTimeout, *verbose)
client := volkszaehler.NewClient(*apiURL, *apiTimeout, *verbose)
server := newServer(client)

http.HandleFunc("/", handler(server.rootHandler, *verbose))
Expand Down
4 changes: 2 additions & 2 deletions volkszaehler/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ type client struct {
}

// NewClient creates new volkszaehler api client
func NewClient(url string, timeout *time.Duration, debug bool) Client {
func NewClient(url string, timeout time.Duration, debug bool) Client {
return &client{
url: detectAPIEndpoint(url),
client: http.Client{
Timeout: *timeout,
Timeout: timeout,
},
debug: debug,
}
Expand Down

0 comments on commit 7d4820a

Please sign in to comment.