diff --git a/registry/remote/repository_example_test.go b/registry/remote/repository_example_test.go index 3ce24ea2..aa9ed662 100644 --- a/registry/remote/repository_example_test.go +++ b/registry/remote/repository_example_test.go @@ -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