From 888c98a6d4e71483d1e25db6d60ff1d0c355c872 Mon Sep 17 00:00:00 2001 From: Sunbread Date: Sun, 5 Jan 2020 00:15:50 +0800 Subject: [PATCH] Change yggdrasil.Client() to yggdrasil.SetClient() --- yggdrasil/yggdrasil.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yggdrasil/yggdrasil.go b/yggdrasil/yggdrasil.go index a0cad1d..ac54f8a 100644 --- a/yggdrasil/yggdrasil.go +++ b/yggdrasil/yggdrasil.go @@ -65,8 +65,8 @@ func rawPost(endpoint string, payload interface{}) (*http.Response, error) { return client.Do(PostRequest) } -// Client return the HTTP client for Yggdrasil. -// Only used when you want to modify settings of the HTTP client. -func Client() *http.Client { - return &client +// SetClient set the HTTP client for Yggdrasil. +// Only used when you want to use custom HTTP client settings. +func SetClient(newclient http.Client) { + client = newclient }