mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-25 10:07:43 +01:00
Fix misspellings of the word credential
Signed-off-by: Matt Burdan <burdz@burdz.net>
This commit is contained in:
parent
72a42451b2
commit
7ba51dbac2
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user