distribution/reference
Sebastiaan van Stijn 552b1526c6
reference: check for prefix instead of splitting, and use consts
- use strings.HasPrefix() to check for the prefix we're interested in instead
  of doing a strings.Split() without limits. This makes the code both easier
  to read, and prevents potential situations where we end up with a long slice.
- use consts for defaults; these should never be modified, so better to use
  consts for them to indicate they're fixed values.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-11-09 15:21:47 +01:00
..
fuzz.go format code with gofumpt 2022-11-03 22:48:20 +01:00
helpers.go Merge pull request #2143 from dmcgowan/reference-familiar-match 2017-01-13 18:32:33 -08:00
normalize.go reference: check for prefix instead of splitting, and use consts 2022-11-09 15:21:47 +01:00
normalize_test.go reference: remove support for deprecated "shortid" refs 2022-11-06 20:23:30 +01:00
reference.go referene: fix formatting of "deprecated" comment. 2022-11-06 22:52:01 +01:00
reference_test.go registry: support ipv6 addresses 2022-06-27 09:54:37 +02:00
regexp.go reference: remove support for deprecated "shortid" refs 2022-11-06 20:23:30 +01:00
regexp_test.go reference: remove support for deprecated "shortid" refs 2022-11-06 20:23:30 +01:00
sort.go reference: implement Sort() 2022-11-08 22:38:47 +01:00
sort_test.go reference: implement Sort() 2022-11-08 22:38:47 +01:00