Fixed 3 nits.

Change-Id: Iaa6de1c6af5f3efe314be069a795222cee1d5fd8
This commit is contained in:
Patrick Jones
2021-01-07 16:10:26 -08:00
parent 9075f29749
commit 1555f5377f

View File

@@ -38,7 +38,7 @@ func (c *Config) TokenSource(ctx context.Context) oauth2.TokenSource {
return oauth2.ReuseTokenSource(nil, ts) return oauth2.ReuseTokenSource(nil, ts)
} }
// Subject token file types // Subject token file types.
const ( const (
fileTypeText = "text" fileTypeText = "text"
fileTypeJSON = "json" fileTypeJSON = "json"
@@ -51,7 +51,7 @@ type format struct {
SubjectTokenFieldName string `json:"subject_token_field_name"` SubjectTokenFieldName string `json:"subject_token_field_name"`
} }
// CredentialSource stores the information necessary to retrieve the credentials for the STS exchange // CredentialSource stores the information necessary to retrieve the credentials for the STS exchange.
type CredentialSource struct { type CredentialSource struct {
File string `json:"file"` File string `json:"file"`
@@ -65,7 +65,7 @@ type CredentialSource struct {
Format format `json:"format"` Format format `json:"format"`
} }
// instance determines the type of CredentialSource needed // parse determines the type of CredentialSource needed
func (c *Config) parse() baseCredentialSource { func (c *Config) parse() baseCredentialSource {
if c.CredentialSource.File != "" { if c.CredentialSource.File != "" {
return fileCredentialSource{File: c.CredentialSource.File, Format: c.CredentialSource.Format} return fileCredentialSource{File: c.CredentialSource.File, Format: c.CredentialSource.Format}