From 0db012fcf1bcb941c6bbd4aa2c7a4e8a42987e7f Mon Sep 17 00:00:00 2001 From: Paul Hinze Date: Mon, 5 Sep 2016 15:02:27 -0500 Subject: [PATCH] provider/azurerm: Remove editorialization from comment --- builtin/providers/azurerm/config.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/builtin/providers/azurerm/config.go b/builtin/providers/azurerm/config.go index 4783ce698..e740ea13e 100644 --- a/builtin/providers/azurerm/config.go +++ b/builtin/providers/azurerm/config.go @@ -135,12 +135,7 @@ func (c *Config) getArmClient() (*ArmClient, error) { return nil, err } - // This is necessary because no-one thought about API usability. OAuthConfigForTenant - // returns a pointer, which can be nil. NewServicePrincipalToken does not take a pointer. - // Consequently we have to nil check this and do _something_ if it is nil, which should - // be either an invariant of OAuthConfigForTenant (guarantee the token is not nil if - // there is no error), or NewServicePrincipalToken should error out if the configuration - // is required and is nil. This is the worst of all worlds, however. + // OAuthConfigForTenant returns a pointer, which can be nil. if oauthConfig == nil { return nil, fmt.Errorf("Unable to configure OAuthConfig for tenant %s", c.TenantID) }