runc/utils.go

18 lines
338 B
Go

package main
import (
"fmt"
"os"
"github.com/Sirupsen/logrus"
)
// fatal prints the error's details if it is a libcontainer specific error type
// then exits the program with an exit status of 1.
func fatal(err error) {
// make sure the error is written to the logger
logrus.Error(err)
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}