Merge pull request #7370 from burdzwastaken/fix/spelling-credentail

Fix misspellings of the word credential
This commit is contained in:
Steven Zou 2019-05-10 17:28:50 +08:00 committed by GitHub
commit 7576800eb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,12 +25,12 @@ type ChartClient struct {
httpClient *http.Client
// Auth info
credentail *Credential
credential *Credential
}
// NewChartClient is constructor of ChartClient
// credentail can be nil
func NewChartClient(credentail *Credential) *ChartClient { // Create http client with customized timeouts
// credential can be nil
func NewChartClient(credential *Credential) *ChartClient { // Create http client with customized timeouts
client := &http.Client{
Timeout: clientTimeout,
Transport: &http.Transport{
@ -41,7 +41,7 @@ func NewChartClient(credentail *Credential) *ChartClient { // Create http client
return &ChartClient{
httpClient: client,
credentail: credentail,
credential: credential,
}
}
@ -115,8 +115,8 @@ func (cc *ChartClient) sendRequest(addr string, method string, body io.Reader) (
}
// Set basic auth
if cc.credentail != nil {
request.SetBasicAuth(cc.credentail.Username, cc.credentail.Password)
if cc.credential != nil {
request.SetBasicAuth(cc.credential.Username, cc.credential.Password)
}
response, err := cc.httpClient.Do(request)