1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/pkg/plugins
Sebastiaan van Stijn 303ea8e820
pkg/plugins: fix compatibility with go1.16
commit c55a4ac779 changed the ioutil utilities
to use the new os variants, per recommendation from the go 1.16 release notes:
https://golang.org/doc/go1.16#ioutil

> we encourage new code to use the new definitions in the io and os packages.
> Here is a list of the new locations of the names exported by io/ioutil:

However, the devil is in the detail, and io.ReadDir() is not a direct
replacement for ioutil.ReadDir();

> ReadDir => os.ReadDir (note: returns a slice of os.DirEntry rather than a slice of fs.FileInfo)

go1.16 added a io.FileInfoToDirEntry() utility to concert a DirEntry to
a FileInfo, but it's not available in go1.16

This patch copies the FileInfoToDirEntry code, and uses it for go1.16.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-31 15:42:54 +02:00
..
pluginrpc-gen refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
transport bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
client.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
client_test.go Reduce TestClientWithRequestTimeout flakiness 2021-06-29 23:53:23 +02:00
discovery.go pkg/plugins: fix compatibility with go1.16 2021-08-31 15:42:54 +02:00
discovery_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
discovery_unix.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
discovery_unix_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
discovery_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
errors.go Add canonical import comment 2018-02-05 16:51:57 -05:00
plugin_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
plugins.go Don't try to load plugin without name 2019-07-08 14:52:45 +02:00
plugins_unix.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
plugins_windows.go Merge pull request #35829 from cpuguy83/no_private_mount_for_plugins 2018-02-21 12:28:13 +01:00
utils.go pkg/plugins: fix compatibility with go1.16 2021-08-31 15:42:54 +02:00
utils_go1.16.go pkg/plugins: fix compatibility with go1.16 2021-08-31 15:42:54 +02:00