9 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
864e3f9348 pkg/longpath: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:19 +02:00
Sebastiaan van Stijn
2054fd99b1 pkg/longpath: remove deprecated Prefix const
This const was deprecated in 424c22390e in
v27.0 and is no longer used, so can be removed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-10-28 10:20:53 +01:00
Sebastiaan van Stijn
48ff86ec64 pkg/longpath: AddPrefix: use early returns
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-17 12:04:26 +02:00
Sebastiaan van Stijn
424c22390e pkg/longpath: deprecate Prefix const
This const was exported because it was in use by pkg/symlink. This
dependency was removed in a48c6e3005,
after which this const was only used internally.

This patch deprecates the const and introduces a non-exported const
to use.

There are no known external consumers of this const, so we may skip
deprecating it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-17 12:03:27 +02:00
Sebastiaan van Stijn
c63ea32a17 pkg/ioutils: TempDir: move to pkg/longpath
This utility wasn't very related to all other utilities in pkg/ioutils.
Moving it to longpath to also make it more clear what it does.

It looks like there's only a single (public) external consumer of this
utility, and only used in a test, and it's not 100% clear if it was
intentional to use our package, of if it was a case of "I actually meant
`io/ioutil.MkdirTemp`" so we could consider skipping the alias.

While moving the package, I also renamed `TempDir` to `MkdirTemp`, which
is the signature it matches in "os" from stdlib.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-20 23:24:12 +01:00
Sebastiaan van Stijn
2e67c85c13 pkg/longpath: fix package GoDoc
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-20 23:23:59 +01:00
Daniel Nephin
4f0d95fa6e Add canonical import comment
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-02-05 16:51:57 -05:00
Stefan J. Wernli
6d223febda Windows: Fixing longpath hanlding of UNC paths.
Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
2015-09-30 19:36:08 -07:00
Stefan J. Wernli
9b648dfac6 Windows: Fix long path handling for docker build
Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
2015-09-15 10:58:11 -07:00