Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
  • Loading branch information
Wwwsylvia committed Sep 7, 2023
1 parent deb17e4 commit ee5e952
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 4 additions & 4 deletions registry/remote/auth/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ var defaultClientID = "oras-go"
// CredentialFunc represents a function that resolves the credential for the
// given registry (i.e. host:port).
//
// `EmptyCredential` is a valid return value and should not be considered as
// [EmptyCredential] is a valid return value and should not be considered as
// an error.
type CredentialFunc func(ctx context.Context, registry string) (Credential, error)
type CredentialFunc func(ctx context.Context, target string) (Credential, error)

// StaticCredential specifies static credentials for the given host.
func StaticCredential(registry string, cred Credential) CredentialFunc {
Expand Down Expand Up @@ -95,9 +95,9 @@ type Client struct {

// Credential specifies the function for resolving the credential for the
// given registry (i.e. host:port).
// `EmptyCredential` is a valid return value and should not be considered as
// EmptyCredential is a valid return value and should not be considered as
// an error.
// If nil, the credential is always resolved to `EmptyCredential`.
// If nil, the credential is always resolved to EmptyCredential.
Credential CredentialFunc

// Cache caches credentials for direct accessing the remote registry.
Expand Down
4 changes: 1 addition & 3 deletions registry/remote/credentials/trace/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ limitations under the License.

package trace

import (
"context"
)
import "context"

// executableTraceContextKey is a value key used to retrieve the ExecutableTrace
// from Context.
Expand Down

0 comments on commit ee5e952

Please sign in to comment.