@@ -36,7 +36,7 @@ type Session struct {
36
36
func NewSession (c Config ) (s * Session , err error ) {
37
37
c .Endpoint = strings .TrimSuffix (c .Endpoint , "/" )
38
38
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" )
40
40
}
41
41
if c .User != "" && c .CFClientID == "" {
42
42
c .CFClientID = "cf"
@@ -80,7 +80,7 @@ func NewSession(c Config) (s *Session, err error) {
80
80
81
81
err = s .init (config , configUaa , c )
82
82
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 ())
84
84
}
85
85
return s , nil
86
86
}
@@ -140,7 +140,7 @@ func (s *Session) init(config *configv3.Config, configUaa *configv3.Config, conf
140
140
})
141
141
info , _ , err := ccClientV3 .GetInfo ()
142
142
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 )
144
144
}
145
145
146
146
// 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
152
152
uaaClient .WrapConnection (uaaWrapper .NewRetryRequest (config .RequestRetryCount ()))
153
153
err = uaaClient .SetupResources (info .UAA (), info .Login ())
154
154
if err != nil {
155
- return fmt .Errorf ("Error setup resource uaa: %s" , err )
155
+ return fmt .Errorf ("error setup resource uaa: %s" , err )
156
156
}
157
157
158
158
// -------------------------
@@ -173,10 +173,10 @@ func (s *Session) init(config *configv3.Config, configUaa *configv3.Config, conf
173
173
config .SetUAAGrantType (string (constant .GrantTypeClientCredentials ))
174
174
}
175
175
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 )
177
177
}
178
178
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." )
180
180
}
181
181
182
182
config .SetAccessToken (fmt .Sprintf ("bearer %s" , accessToken ))
@@ -225,7 +225,7 @@ func (s *Session) init(config *configv3.Config, configUaa *configv3.Config, conf
225
225
return fmt .Errorf ("Error when authenticate on uaa: %s" , err )
226
226
}
227
227
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." )
229
229
}
230
230
configUaa .SetAccessToken (fmt .Sprintf ("bearer %s" , accessTokenSess ))
231
231
configUaa .SetRefreshToken (refreshTokenSess )
0 commit comments