Make DefaultClient a method that returns the global default client
I made this a method to prevent other users from reassigning the previously exported DefaultClient, e.g. doing something like: ```go reddit.DefaultClient = nil ``` Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
@@ -134,7 +134,7 @@ func TestNewReadonlyClient_Error(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestDefaultClient(t *testing.T) {
|
||||
require.NotNil(t, DefaultClient)
|
||||
require.NotNil(t, DefaultClient())
|
||||
}
|
||||
|
||||
func TestClient_Readonly_NewRequest(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user