moby/builder/remotecontext
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
..
git refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
urlutil pkg/urlutil: deprecate, and move to builder/remotecontext/urlutil 2022-04-12 19:58:05 +02:00
archive.go Add canonical import comment 2018-02-05 16:51:57 -05:00
detect.go pkg/urlutil: deprecate, and move to builder/remotecontext/urlutil 2022-04-12 19:58:05 +02:00
detect_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
filehash.go Add canonical import comment 2018-02-05 16:51:57 -05:00
generate.go Add canonical import comment 2018-02-05 16:51:57 -05:00
git.go Add canonical import comment 2018-02-05 16:51:57 -05:00
lazycontext.go LCOW: lazycontext: Use correct lstat, fix archive check 2018-06-27 13:29:21 -07:00
mimetype.go Add canonical import comment 2018-02-05 16:51:57 -05:00
mimetype_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
remote.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
remote_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
tarsum.go remove unneeded "digest" alias for "go-digest" 2022-03-04 14:49:42 +01:00
tarsum.pb.go LCOW: Implemented support for docker cp + build 2017-09-14 12:07:52 -07:00
tarsum.proto Implement incremental file sync using client session 2017-06-22 11:52:35 -07:00
tarsum_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
utils_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00