Skip to content
This repository has been archived by the owner on Apr 7, 2024. It is now read-only.

Commit

Permalink
refined the doc comment
Browse files Browse the repository at this point in the history
Signed-off-by: wangxiaoxuan273 <[email protected]>
  • Loading branch information
wangxiaoxuan273 committed Apr 13, 2023
1 parent 924fcc9 commit 310f0f7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ import (
"oras.land/oras-go/v2/registry/remote/auth"
)

// Login provides the login functionality with the given credentials. A local client is used
// to keep the original client of the registry intact.
// Login provides the login functionality with the given credentials. The target
// registry's client should be nil or of type *auth.Client. Login uses
// a client local to the function and will not modify the original client of
// the registry.
func Login(ctx context.Context, store Store, reg *remote.Registry, cred auth.Credential) error {
// create a clone of the original registry for login purpose
regClone := *reg
Expand Down

0 comments on commit 310f0f7

Please sign in to comment.