moby/cmd/dockerd/error.go
Sebastiaan van Stijn 6a90113e68
cli: move cobra customizations into cmd/dockerd
The cli package is a leftover from when the "docker" and "dockerd" cli
were both maintained in this repository; the only consumer of this is
now the dockerd CLI, so we can move this code (it should not be imported
by anyone).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-14 11:37:51 +01:00

15 lines
263 B
Go

package main
import (
"fmt"
)
// StatusError reports an unsuccessful exit by a command.
type StatusError struct {
Status string
StatusCode int
}
func (e StatusError) Error() string {
return fmt.Sprintf("Status: %s, Code: %d", e.Status, e.StatusCode)
}