Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lang): update misspelling in copy.go #487

Merged
merged 1 commit into from
Aug 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cmd/oras/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type copyOptions struct {
src option.Remote
dst option.Remote
option.Common
rescursive bool
recursive bool

srcRef string
dstRef string
Expand Down Expand Up @@ -60,7 +60,7 @@ Examples - Copy the artifact tagged 'v1' and its referrers from repository 'loca
},
}

cmd.Flags().BoolVarP(&opts.rescursive, "recursive", "r", false, "recursively copy artifacts and its referrer artifacts")
cmd.Flags().BoolVarP(&opts.recursive, "recursive", "r", false, "recursively copy artifacts and its referrer artifacts")
opts.src.ApplyFlagsWithPrefix(cmd.Flags(), "from", "source")
opts.dst.ApplyFlagsWithPrefix(cmd.Flags(), "to", "destination")
option.ApplyFlags(&opts, cmd.Flags())
Expand Down Expand Up @@ -112,13 +112,13 @@ func runCopy(opts copyOptions) error {
if err != nil {
return err
}
if opts.rescursive {
if opts.recursive {
err = oras.ExtendedCopyGraph(ctx, src, dst, desc, extendedCopyOptions.ExtendedCopyGraphOptions)
} else {
err = oras.CopyGraph(ctx, src, dst, desc, extendedCopyOptions.CopyGraphOptions)
}
} else {
if opts.rescursive {
if opts.recursive {
desc, err = oras.ExtendedCopy(ctx, src, opts.srcRef, dst, opts.dstRef, extendedCopyOptions)
} else {
copyOptions := oras.CopyOptions{
Expand Down