Remove fatalf()

It was only used in one place, all others are happy with
`fatal(fmt.Errorf())`.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin 2020-05-02 16:18:30 -07:00
parent dd8d48ede8
commit c52a598d74
2 changed files with 1 additions and 5 deletions

View File

@ -60,7 +60,7 @@ checkpointed.`,
return err return err
} }
if status == libcontainer.Created || status == libcontainer.Stopped { if status == libcontainer.Created || status == libcontainer.Stopped {
fatalf("Container cannot be checkpointed in %s state", status.String()) fatal(fmt.Errorf("Container cannot be checkpointed in %s state", status.String()))
} }
options := criuOptions(context) options := criuOptions(context)
if !(options.LeaveRunning || options.PreDump) { if !(options.LeaveRunning || options.PreDump) {

View File

@ -91,10 +91,6 @@ func getContainer(context *cli.Context) (libcontainer.Container, error) {
return factory.Load(id) return factory.Load(id)
} }
func fatalf(t string, v ...interface{}) {
fatal(fmt.Errorf(t, v...))
}
func getDefaultImagePath(context *cli.Context) string { func getDefaultImagePath(context *cli.Context) string {
cwd, err := os.Getwd() cwd, err := os.Getwd()
if err != nil { if err != nil {