Fix misspellings of the word credential

Signed-off-by: Matt Burdan <burdz@burdz.net>
This commit is contained in:
Matt Burdan 2019-04-12 20:35:54 -07:00
parent 72a42451b2
commit 7ba51dbac2
No known key found for this signature in database
GPG Key ID: 66506DB8CEB25AA6

View File

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