This commit is contained in:
20
pokeapi/client.go
Normal file
20
pokeapi/client.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package pokeapi
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Client -
|
||||
type Client struct {
|
||||
httpClient http.Client
|
||||
}
|
||||
|
||||
// NewClient -
|
||||
func NewClient(timeout time.Duration) Client {
|
||||
return Client{
|
||||
httpClient: http.Client{
|
||||
Timeout: timeout,
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user