Skip to content

Commit 5e56fca

Browse files
authored
Merge pull request Yamashou#12 from Yamashou/new-client
Add NewClient
2 parents e6847a9 + 95e3e68 commit 5e56fca

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clientgen/template.gotpl

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ type Client struct {
1818
Client *client.Client
1919
}
2020

21+
func NewClient(cli *http.Client, baseURL string, options ...client.HTTPRequestOption) *Client {
22+
return &Client{Client: client.NewClient(cli, baseURL, options...)}
23+
}
24+
2125
type {{ .Query.Name | go }} {{ .Query.Type | ref }}
2226

2327
type {{ .Mutation.Name | go }} {{ .Mutation.Type | ref }}

0 commit comments

Comments
 (0)