helpers_deprecated.go 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. package reference
  2. import "github.com/distribution/reference"
  3. // IsNameOnly returns true if reference only contains a repo name.
  4. //
  5. // Deprecated: use [reference.IsNameOnly].
  6. func IsNameOnly(ref reference.Named) bool {
  7. return reference.IsNameOnly(ref)
  8. }
  9. // FamiliarName returns the familiar name string
  10. // for the given named, familiarizing if needed.
  11. //
  12. // Deprecated: use [reference.FamiliarName].
  13. func FamiliarName(ref reference.Named) string {
  14. return reference.FamiliarName(ref)
  15. }
  16. // FamiliarString returns the familiar string representation
  17. // for the given reference, familiarizing if needed.
  18. //
  19. // Deprecated: use [reference.FamiliarString].
  20. func FamiliarString(ref reference.Reference) string {
  21. return reference.FamiliarString(ref)
  22. }
  23. // FamiliarMatch reports whether ref matches the specified pattern.
  24. // See [path.Match] for supported patterns.
  25. //
  26. // Deprecated: use [reference.FamiliarMatch].
  27. func FamiliarMatch(pattern string, ref reference.Reference) (bool, error) {
  28. return reference.FamiliarMatch(pattern, ref)
  29. }