deprecated.go 952 B

123456789101112131415161718192021
  1. package urlutil // import "github.com/docker/docker/pkg/urlutil"
  2. import "github.com/docker/docker/builder/remotecontext/urlutil"
  3. // IsURL returns true if the provided str is an HTTP(S) URL.
  4. //
  5. // Deprecated: use github.com/docker/docker/builder/remotecontext/urlutil.IsURL
  6. // to detect build-context type, or use strings.HasPrefix() to check if the
  7. // string has a https:// or http:// prefix.
  8. func IsURL(str string) bool {
  9. // TODO(thaJeztah) when removing this alias, remove the exception from hack/validate/pkg-imports and hack/make.ps1 (Validate-PkgImports)
  10. return urlutil.IsURL(str)
  11. }
  12. // IsGitURL returns true if the provided str is a git repository URL.
  13. //
  14. // Deprecated: use github.com/docker/docker/builder/remotecontext/urlutil.IsGitURL
  15. func IsGitURL(str string) bool {
  16. // TODO(thaJeztah) when removing this alias, remove the exception from hack/validate/pkg-imports and hack/make.ps1 (Validate-PkgImports)
  17. return urlutil.IsGitURL(str)
  18. }