Skip to content

Commit

Permalink
fix(lang): update misspelling in copy.go
Browse files Browse the repository at this point in the history
Signed-off-by: Juncheng Zhu <[email protected]>
  • Loading branch information
junczhu authored and shizhMSFT committed Aug 12, 2022
1 parent 6ca26fe commit b84cd7b
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit b84cd7b

Please sign in to comment.