Commit Graph

10 Commits

Author SHA1 Message Date
Eng Zer Jun
50da673592
refactor: move from io/ioutil to io and os package
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>
2021-09-21 09:50:38 +08:00
ktock
fdb76f55d8 Fix backword-compatibility issue of non-versioned config file
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>
2021-04-15 10:00:58 +09:00
Davanum Srinivas
9ad087947d
Switch all our tests to version 2
Also warn when someone uses version 1

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-04-12 13:18:33 -04:00
Sebastiaan van Stijn
f2edc6f164
vendor: update gotest.tools v3.0.2
full diff: https://github.com/gotestyourself/gotest.tools/compare/v2.3.0...v3.0.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-28 17:47:20 +01:00
Wei Fu
3d1fdacccf config_test: sort result before check
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>
2019-09-05 16:30:28 +08:00
Maksym Pavlenko
24b9e2c1a0 Merge configs section by section
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-08-23 15:49:02 -07:00
Maksym Pavlenko
8ebffecbc3 Use map for stream processors
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-08-23 15:31:37 -07:00
Maksym Pavlenko
19cd0a4f12 Append slices when importing config files
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-08-23 10:12:19 -07:00
Maksym Pavlenko
bca0857530 Fix toml plugin decoding
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>
2019-08-22 17:22:25 -07:00
Maksym Pavlenko
a1e3779cad Support config imports #3289
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-08-22 15:50:58 -07:00