Skip to content

Commit

Permalink
Code clean
Browse files Browse the repository at this point in the history
Signed-off-by: Billy Zha <[email protected]>
  • Loading branch information
qweeah committed Apr 6, 2022
1 parent d2f47ee commit e801665
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions registry/remote/repository_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,12 @@ func ExampleRepository_Tags() {
panic(err) // Handle error
}

fn := func(tags []string) error { // Setup a callback function to process returned tag list
repo.Tags(ctx, func(tags []string) error {
for _, tag := range tags {
fmt.Println(tag)
}
return nil
}
repo.Tags(ctx, fn)
})

// Output:
// tag1
Expand Down

0 comments on commit e801665

Please sign in to comment.