libct/error.go: rm ConfigError

ConfigError was added by commit e918d02139, while removing runc own
error system, to preserve a way for a libcontainer user to distinguish
between a configuration error and something else.

The way ConfigError is implemented requires a different type of check
(compared to all other errors defined by error.go). An attempt was made
to rectify this, but the resulting code became even more complicated.

As no one is using this functionality (of differentiating a "bad config"
type of error from other errors), let's just drop the ConfigError type.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2021-07-01 10:54:58 -07:00
parent 6145628fff
commit 538ba846dd
3 changed files with 4 additions and 12 deletions
-8
View File
@@ -11,11 +11,3 @@ var (
ErrNotRunning = errors.New("container not running")
ErrNotPaused = errors.New("container not paused")
)
type ConfigError struct {
details string
}
func (e *ConfigError) Error() string {
return "invalid configuration: " + e.details
}