Skip to content

Commit f3ace17

Browse files
committed
better docs for ClientOption
1 parent f2c2380 commit f3ace17

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

client.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,15 @@ func (c *Client) Run(ctx context.Context, request *Request, response interface{}
108108

109109
// WithHTTPClient specifies the underlying http.Client to use when
110110
// making requests.
111+
// NewClient(endpoint, WithHTTPClient(specificHTTPClient))
111112
func WithHTTPClient(httpclient *http.Client) ClientOption {
112113
return ClientOption(func(client *Client) {
113114
client.httpClient = httpclient
114115
})
115116
}
116117

117-
// ClientOption is a function that modifies the client in some way.
118+
// ClientOption are functions that are passed into NewClient to
119+
// modify the behaviour of the Client.
118120
type ClientOption func(*Client)
119121

120122
type graphErr struct {

0 commit comments

Comments
 (0)