From 2a5a0e75e5cf4d082d65e1670cde5be4a382a97d Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 30 Oct 2019 14:43:01 +0000 Subject: [PATCH] Fix NewClientWithHTTP (#192) --- gitea/client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gitea/client.go b/gitea/client.go index 606b420..e9c121f 100644 --- a/gitea/client.go +++ b/gitea/client.go @@ -39,9 +39,10 @@ func NewClient(url, token string) *Client { } // NewClientWithHTTP creates an API client with a custom http client -func NewClientWithHTTP(url string, httpClient *http.Client) { +func NewClientWithHTTP(url string, httpClient *http.Client) *Client { client := NewClient(url, "") client.client = httpClient + return client } // SetHTTPClient replaces default http.Client with user given one.