moby--moby/hack/validate
Sebastiaan van Stijn 5f89a6a78e
pkg/urlutil: deprecate, and move to builder/remotecontext/urlutil
pkg/urlutil (despite its poorly chosen name) is not really intended as a generic
utility to handle URLs, and should only be used by the builder to handle (remote)
build contexts.

- IsURL() only does a very rudimentary check for http(s):// prefixes, without any
  other validation, but due to its name may give incorrect expectations.
- IsGitURL() is written specifically with docker build remote git contexts in
  mind, and has handling for backward-compatibility, where strings that are
  not URLs, but start with "github.com/" are accepted.

Because of the above, this patch:

- moves the package inside builder/remotecontext, close to where it's intended
  to be used (ideally this would be part of build/remotecontext itself, but this
  package imports many other dependencies, which would introduce those as extra
  dependencies in the CLI).
- deprecates pkg/urlutil, but adds aliases as there are some external consumers.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-12 19:58:05 +02:00
..
.swagger-yamllint Add swagger.yaml validation 2016-11-07 11:03:21 -08:00
.validate hack: no need to git fetch in CI 2019-02-05 02:54:50 +00:00
all run shfmt 2020-03-03 12:27:49 +09:00
changelog-date-descending hack: fix mixed tabs/spaces for indentation 2019-08-02 15:58:33 +02:00
changelog-well-formed hack: fix mixed tabs/spaces for indentation 2019-08-02 15:58:33 +02:00
dco run shfmt 2020-03-03 12:27:49 +09:00
default hack/validate: skip DCO in "default" 2021-05-17 15:10:50 +02:00
default-seccomp run shfmt 2020-03-03 12:27:49 +09:00
deprecate-integration-cli run shfmt 2020-03-03 12:27:49 +09:00
golangci-lint run shfmt 2020-03-03 12:27:49 +09:00
golangci-lint.yml Dockerfile: update golangci-lint v1.44.0 2022-02-08 09:43:30 +01:00
pkg-imports pkg/urlutil: deprecate, and move to builder/remotecontext/urlutil 2022-04-12 19:58:05 +02:00
shfmt Fixup libnetwork lint errors 2021-06-01 23:48:32 +00:00
swagger run shfmt 2020-03-03 12:27:49 +09:00
swagger-gen run shfmt 2020-03-03 12:27:49 +09:00
toml validate/toml: switch to github.com/pelletier/go-toml 2021-04-02 16:08:17 +02:00
vendor hack/vendor.sh: run "go mod tidy" before vendoring 2022-02-05 11:25:23 +01:00