Skip to content

Commit

Permalink
Update dependencies and sort functions
Browse files Browse the repository at this point in the history
  • Loading branch information
cnfatal committed Jan 2, 2024
1 parent 08d140a commit 88d8722
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (
github.com/mholt/archiver/v4 v4.0.0-alpha.7
github.com/opencontainers/go-digest v1.0.0
github.com/spf13/cobra v1.7.0
golang.org/x/exp v0.0.0-20230419192730-864b3d6c5c2c
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b
golang.org/x/sync v0.1.0
golang.org/x/term v0.7.0
gopkg.in/yaml.v3 v3.0.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ=
golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE=
golang.org/x/exp v0.0.0-20230419192730-864b3d6c5c2c h1:HDdYQYKOkvJT/Plb5HwJJywTVyUnIctjQm6XSnZ/0CY=
golang.org/x/exp v0.0.0-20230419192730-864b3d6c5c2c/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b h1:kLiC65FbiHWFAOu+lxwNPujcsl8VYyTYYEZnsOO1WK4=
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
Expand Down
4 changes: 2 additions & 2 deletions pkg/registry/store_fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ func (m *FSRegistryStore) GetIndex(ctx context.Context, repository string, searc
}

func (m *FSRegistryStore) PutIndex(ctx context.Context, repository string, index types.Index) error {
slices.SortFunc(index.Manifests, func(a, b types.Descriptor) bool {
return strings.Compare(a.Name, b.Name) < 0
slices.SortFunc(index.Manifests, func(a, b types.Descriptor) int {
return strings.Compare(a.Name, b.Name)
})

// use latest manifest annotations as index annotations
Expand Down
4 changes: 2 additions & 2 deletions pkg/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ func (a Annotations) String() string {
return strings.Join(result, ",")
}

func SortDescriptorName(a, b Descriptor) bool {
return strings.Compare(a.Name, b.Name) < 0
func SortDescriptorName(a, b Descriptor) int {
return strings.Compare(a.Name, b.Name)
}

type Index struct {
Expand Down

0 comments on commit 88d8722

Please sign in to comment.