We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4943771 + 39b5f90 commit cc75a11Copy full SHA for cc75a11
server/config.go
@@ -5,6 +5,8 @@ import (
5
"io"
6
7
"github.com/BurntSushi/toml"
8
+ "github.com/containerd/containerd/errdefs"
9
+ "github.com/pkg/errors"
10
)
11
12
// Config provides containerd configuration data for the server
@@ -77,7 +79,7 @@ func (c *Config) WriteTo(w io.Writer) (int64, error) {
77
79
// LoadConfig loads the containerd server config from the provided path
78
80
func LoadConfig(path string, v *Config) error {
81
if v == nil {
- v = &Config{}
82
+ return errors.Wrapf(errdefs.ErrInvalidArgument, "argument v must not be nil")
83
}
84
md, err := toml.DecodeFile(path, v)
85
if err != nil {
0 commit comments