1
0
mirror of https://github.com/regclient/regclient.git synced 2025-04-18 22:44:00 +03:00

3 Commits

Author SHA1 Message Date
Brandon Mitchell
95c9152941
Chore: Modernize Go to the 1.22 specs
- Use "any" instead of an empty interface.
- Use range over an integer for for loops.
- Remove shadow variables in loops now that Go no longer reuses the variable.
- Use "slices.Contains", "slices.Delete", "slices.Equal", "slices.Index", "slices.SortFunc".
- Use "cmp.Or", "min", and "max".
- Use "fmt.Appendf" instead of "Sprintf" for generating a byte slice.
- Use "errors.Join" or "fmt.Errorf" with multiple "%w" for multiple errors.

Additionally, use modern regclient features:

- Use "ref.SetTag", "ref.SetDigest", and "ref.AddDigest".
- Call "regclient.ManifestGet" using "WithManifestDesc" instead of setting the digest on the reference.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2025-02-18 14:32:06 -05:00
Brandon Mitchell
763599514d
Feat: Include source in referrers response
This simplifies handling external sources.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-12-03 17:12:10 -05:00
Brandon Mitchell
a8a9640fec
Feat: Support referrers in an external repository
This allows organizations to maintain a repository of referrers separate from the upstream images.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-11-29 15:42:44 -05:00