mirror of
https://github.com/distribution/distribution.git
synced 2025-09-26 06:40:12 +00:00
Merge pull request #3143 from eyJhb/pagination
OCI: Add pagination on `/v2/<name>/tags/list`
This commit is contained in:
@@ -3,6 +3,7 @@ package storage
|
||||
import (
|
||||
"context"
|
||||
"path"
|
||||
"sort"
|
||||
|
||||
"github.com/distribution/distribution/v3"
|
||||
storagedriver "github.com/distribution/distribution/v3/registry/storage/driver"
|
||||
@@ -47,6 +48,10 @@ func (ts *tagStore) All(ctx context.Context) ([]string, error) {
|
||||
tags = append(tags, filename)
|
||||
}
|
||||
|
||||
// there is no guarantee for the order,
|
||||
// therefore sort before return.
|
||||
sort.Strings(tags)
|
||||
|
||||
return tags, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user