From edfa1b3a6950999c226a0c1e6e8c10735013137b Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sun, 23 Jul 2017 11:31:27 +0100 Subject: [PATCH] oauthutil: fix panic from use of nil context --- oauthutil/oauthutil.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oauthutil/oauthutil.go b/oauthutil/oauthutil.go index a4ab71f74..5c5dfe3bf 100644 --- a/oauthutil/oauthutil.go +++ b/oauthutil/oauthutil.go @@ -188,7 +188,7 @@ var _ oauth2.TokenSource = (*TokenSource)(nil) // Context returns a context with our HTTP Client baked in for oauth2 func Context() context.Context { - return context.WithValue(nil, oauth2.HTTPClient, fs.Config.Client()) + return context.WithValue(context.Background(), oauth2.HTTPClient, fs.Config.Client()) } // overrideCredentials sets the ClientID and ClientSecret from the