mirror of
https://github.com/goharbor/harbor
synced 2024-09-20 18:27:40 +00:00
Merge pull request #7370 from burdzwastaken/fix/spelling-credentail
Fix misspellings of the word credential
This commit is contained in:
commit
7576800eb2
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user