The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
According to the doc about `config.toml` of containerd:
```
If no version number is specified inside the config file then it is assumed to
be a version 1 config and parsed as such.
```
However, it's not true recently.
This will break the backward-compatibility in some environment.
This commit fixes this issue.
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
config imports is in random order after LoadConfig call so that the
testing check should be done after sort.Strings(out.Imports).
Signed-off-by: Wei Fu <fuweid89@gmail.com>
Do not rely on toml metadata when decoding plugin's configs as it's not possible to merge toml.MetaData structs during import.
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>