Skip to content

Commit 2f99d42

Browse files
committed
remove capitalized strings ask by linter
1 parent b2fa7c3 commit 2f99d42

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

session.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type Session struct {
3636
func NewSession(c Config) (s *Session, err error) {
3737
c.Endpoint = strings.TrimSuffix(c.Endpoint, "/")
3838
if c.User == "" && c.CFClientID == "" {
39-
return nil, fmt.Errorf("Couple of user/password or uaa_client_id/uaa_client_secret must be set")
39+
return nil, fmt.Errorf("couple of user/password or uaa_client_id/uaa_client_secret must be set")
4040
}
4141
if c.User != "" && c.CFClientID == "" {
4242
c.CFClientID = "cf"
@@ -80,7 +80,7 @@ func NewSession(c Config) (s *Session, err error) {
8080

8181
err = s.init(config, configUaa, c)
8282
if err != nil {
83-
return nil, fmt.Errorf("Error when creating clients: %s", err.Error())
83+
return nil, fmt.Errorf("error when creating clients: %s", err.Error())
8484
}
8585
return s, nil
8686
}
@@ -140,7 +140,7 @@ func (s *Session) init(config *configv3.Config, configUaa *configv3.Config, conf
140140
})
141141
info, _, err := ccClientV3.GetInfo()
142142
if err != nil {
143-
return fmt.Errorf("Could not fetch api root informations: %s", err)
143+
return fmt.Errorf("could not fetch api root informations: %s", err)
144144
}
145145

146146
// create an uaa client with cf_username/cf_password or client_id/client secret
@@ -152,7 +152,7 @@ func (s *Session) init(config *configv3.Config, configUaa *configv3.Config, conf
152152
uaaClient.WrapConnection(uaaWrapper.NewRetryRequest(config.RequestRetryCount()))
153153
err = uaaClient.SetupResources(info.UAA(), info.Login())
154154
if err != nil {
155-
return fmt.Errorf("Error setup resource uaa: %s", err)
155+
return fmt.Errorf("error setup resource uaa: %s", err)
156156
}
157157

158158
// -------------------------
@@ -173,10 +173,10 @@ func (s *Session) init(config *configv3.Config, configUaa *configv3.Config, conf
173173
config.SetUAAGrantType(string(constant.GrantTypeClientCredentials))
174174
}
175175
if err != nil {
176-
return fmt.Errorf("Error when authenticate on cf: %s", err)
176+
return fmt.Errorf("error when authenticate on cf: %s", err)
177177
}
178178
if accessToken == "" {
179-
return fmt.Errorf("A pair of username/password or a pair of client_id/client_secret muste be set.")
179+
return fmt.Errorf("a pair of username/password or a pair of client_id/client_secret muste be set.")
180180
}
181181

182182
config.SetAccessToken(fmt.Sprintf("bearer %s", accessToken))
@@ -225,7 +225,7 @@ func (s *Session) init(config *configv3.Config, configUaa *configv3.Config, conf
225225
return fmt.Errorf("Error when authenticate on uaa: %s", err)
226226
}
227227
if accessTokenSess == "" {
228-
return fmt.Errorf("A pair of pair of uaa_client_id/uaa_client_secret muste be set.")
228+
return fmt.Errorf("a pair of pair of uaa_client_id/uaa_client_secret muste be set.")
229229
}
230230
configUaa.SetAccessToken(fmt.Sprintf("bearer %s", accessTokenSess))
231231
configUaa.SetRefreshToken(refreshTokenSess)

0 commit comments

Comments
 (0)