264 Commits
Author SHA1 Message Date
Milos Gajdos 0965666a6a Merge pull request #27 from thaJeztah/internalize_ReferenceRegexp
remove internal uses of ReferenceRegexp
2026-04-18 09:49:26 -07:00
Sebastiaan van Stijn 6ccba5a0d2 remove internal uses of ReferenceRegexp
Split into a non-exported and exported regex, and use the non-exported
regex internally.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-04-18 17:21:58 +02:00
Milos Gajdos 56cff07eb5 Merge pull request #26 from thaJeztah/optimize_parse 2026-04-18 07:18:02 -07:00
Sebastiaan van Stijn 2bae058dc6 Parse: minor optimizations
- add early return for empty strings
- skip lowercase-regex if the input is already lowercase

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-04-18 11:40:42 +02:00
Milos Gajdos 727f80d422 Merge pull request #22 from thaJeztah/more_consts
make more expressions a const
2025-04-12 10:40:17 -07:00
Sebastiaan van Stijn c577ba6add make more expressions a const
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-12 16:03:12 +02:00
Milos Gajdos e3db434c65 Merge pull request #21 from thaJeztah/bump_gha
ci: update actions to current versions, golangci-lint v2, test against latest go versions
2025-04-11 14:51:19 -07:00
Sebastiaan van Stijn f0f7bf2412 gha: run codeQL on PRs, and add comment for cron
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-11 12:38:33 +02:00
Sebastiaan van Stijn 8650ce9f9f gha: test against Go "oldest", stable and oldstable, drop 1.20
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-11 12:34:21 +02:00
Sebastiaan van Stijn fa05a2bd78 gha: update codecov/codecov-action@v5
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-11 10:11:30 +02:00
Sebastiaan van Stijn f4a09992bf gha: golangci/golangci-lint-action@v7, golangci-lint v2.0.x
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-11 10:11:03 +02:00
Sebastiaan van Stijn f34892d508 gha: update fossa-contrib/fossa-action@v3
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-11 10:10:08 +02:00
Sebastiaan van Stijn 0a954c6922 gha: update codeql actions to v3
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-11 10:10:08 +02:00
Milos Gajdos 8c942b0459 Merge pull request #16 from thaJeztah/update_gha
gha: update actions, and update to go1.21, go1.22
2024-07-18 14:25:15 +01:00
Milos Gajdos 371b75ecca Merge pull request #13 from thaJeztah/algorithms
add notes and godoc about registering algorithms
2024-07-18 14:15:51 +01:00
Sebastiaan van Stijn 343e590ea7 gha: update to go1.21.x, go1.22.x
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-15 13:56:27 +02:00
Sebastiaan van Stijn 0c5e42c50c gha: update golangci-lint to v1.59
Error: fuzz_test.go:11:14: unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
        f.Fuzz(func(t *testing.T, data string) {
                    ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-15 13:56:18 +02:00
Sebastiaan van Stijn 2ab2cce5b1 gha: update codecov/codecov-action@v4
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-15 13:50:00 +02:00
Sebastiaan van Stijn 92b1472c52 gha: update golangci/golangci-lint-action@v6
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-15 13:49:41 +02:00
Sebastiaan van Stijn 5291d101b9 gha: update actions/setup-go@v5
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-15 13:47:33 +02:00
Sebastiaan van Stijn 08b97d2dd4 gha: update actions/checkout@v4
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-15 13:46:40 +02:00
Sebastiaan van Stijn 284a39eaf3 add notes and godoc about registering algorithms
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-05-09 16:33:30 +02:00
Milos Gajdos ff14fafe22 Merge pull request #9 from ozairasim/exclude-domain-from-name-length-validation
Exclude domain from name length check
v0.6.0
2024-03-20 17:09:59 +00:00
Milos Gajdos 2a663126da Merge pull request #10 from xrstf/patch-1 2024-03-20 14:10:34 +00:00
Christoph Mewes 094e717c28 fix typo in readme
Signed-off-by: Christoph Mewes <christoph@kubermatic.com>
2024-03-20 14:55:53 +01:00
Ozair aaca75ef76 Exclude domain from name length check
Signed-off-by: Ozair <ozair.asim@docker.com>
2024-02-14 10:57:28 +01:00
Milos Gajdos 8507c7fcf0 Merge pull request #7 from thaJeztah/cleanup_splitDockerDomain 2023-09-02 13:15:55 +01:00
Sebastiaan van Stijn 89ee7ec63e refactor splitDockerDomain to include more documentation
The splitDockerDomain attempts to determine whether the given name
contains a domain, or should be used as a "remote-name". The logic used
in doing so is based on (legacy) conventions, which have not always been
properly documented.

The logic used in this function was also optimized for "brevity", but
not easy to ready, due to the combination of multiple boolean conditions
combined on a single line, and some "double negatives".

More documentation may still be needed, but let's start with documenting
the logic used in this function;

- Use `strings.Cut()` instead of  `strings.IndexRune()`, which allows us to
  use descriptive variable names, and prevents use of the magic `-1` value.
- Split the conditions into a switch, so that each of them can be documented
  separately. While this makes the  code more verbose (and introduces some
  duplication), it should not impact performance, as only one condition
  would ever be met (performance may even be better, as the old code
  combined multiple conditions with `&&`).
- Introduce a fast-path for single-element ("familiar") names. These names
  can be canonicalized early, without doing further handling.

While working on the code, I also discovered an existing bug (or omission)
where the code would not handle bare _domain names_. Ironically, the
TestParseDockerRef test has a test-case name "hostname only", but which does
not cover that case. THat test-case was transferred from containerd/cri,
and does not describe this scenario (possibly was left as a "further exercise");
https://github.com/containerd/cri/commit/25fdf726923b607d0155550c5e85a911bb04bad1

Let keep it as a further exercise, but add a "TODO" to remind us doing so.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-02 12:48:32 +02:00
Milos Gajdos a3fb784683 Merge pull request #5 from thaJeztah/rm_deprecated 2023-09-01 13:24:49 +01:00
Milos Gajdos 49c28499d2 Merge pull request #3 from Jamstah/coverage v0.5.0 2023-08-31 13:20:50 +01:00
Sebastiaan van Stijn 4894124079 remove deprecated SplitHostname
It was deprecated since distribution [v2.7.0-rc.0][1]

[1]: https://github.com/distribution/distribution/commit/9a43b8f6961d975f5d29587b3b89972bf18ea8dc

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-31 13:59:39 +02:00
James Hewitt 2566ed438c Add coverage and have one workflow for standard CI
Signed-off-by: James Hewitt <james.hewitt@uk.ibm.com>
2023-08-31 12:27:56 +01:00
Milos Gajdos 0dff0fce6d Merge pull request #4 from Jamstah/badges
Use test.yml for the badge as we have no CI workflow
2023-08-31 11:29:26 +01:00
James Hewitt 4175ff0086 Use test.yml for the badge as we have no CI workflow
Signed-off-by: James Hewitt <james.hewitt@uk.ibm.com>
2023-08-31 11:22:48 +01:00
Milos Gajdos 5e94b147e9 Merge pull request #2 from thaJeztah/fix_dupwords
golangci-lint: remove unused settings, sort linters, and enable dupwords
2023-08-31 10:58:31 +01:00
Milos Gajdos 32c15deb75 Merge pull request #1 from Jamstah/readme
Update project docs
2023-08-31 10:48:26 +01:00
Sebastiaan van Stijn f5c0e07903 golangci-lint: enable dupword linter
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-31 11:40:38 +02:00
Sebastiaan van Stijn 2c90bf1dc3 golangci-lint: remove unused settings, and sort linters
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-31 11:37:49 +02:00
James Hewitt 6b306beae7 Update project docs
Signed-off-by: James Hewitt <james.hewitt@uk.ibm.com>
2023-08-31 10:34:21 +01:00
Sebastiaan van Stijn e42074f83a add go.mod, and basic github action workflows
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-30 16:59:23 +02:00
Hayley Swimelar 3500af3275 Merge pull request #4016 from milosgajdos/maintainers-email
Update milosgajdos maintainer email
2023-08-24 10:06:47 -07:00
Milos Gajdos 2b252d9dae Update milosgajdos maintainer email
Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
2023-08-24 15:54:38 +01:00
Milos Gajdos 110c013607 Merge pull request #4006 from milosgajdos/enable-bodyclose
Enable bodyclose linter
2023-08-21 09:34:35 +01:00
Milos Gajdos d898931c9a Enable bodyclose linter
Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
2023-08-19 09:45:44 +01:00
Milos Gajdos 4e0046c1c9 Merge pull request #3995 from waynr/waynr-patch-1
Remove waynr from MAINTAINERS
2023-08-18 08:18:35 +01:00
wayne 808c1afafd Remove waynr from MAINTAINERS
Signed-off-by: wayne <wayne.warren.s@gmail.com>
2023-08-17 09:32:28 -06:00
David van der Spek 88865c6ef3 Add James Hewitt as a reviewer
Signed-off-by: David van der Spek <vanderspek.david@gmail.com>
2023-08-17 16:47:54 +02:00
Milos Gajdos 276d7f16ce Merge pull request #3741 from sashashura/patch-1
GitHub Workflows security hardening
2023-08-14 19:21:28 +01:00
Milos Gajdos 0676ca1701 Merge pull request #3980 from milosgajdos/new-reviewer
Propose David van der Spek as a new reviewer
2023-08-14 14:00:34 +01:00
Milos Gajdos e40d626c7c Add David van der Spek as a new reviewer
Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
2023-08-14 09:16:24 +01:00