gitlab.com/evatix-go/core@v1.3.55/errcore/ToExitError.go (about)

     1  package errcore
     2  
     3  import "os/exec"
     4  
     5  func ToExitError(err error) *exec.ExitError {
     6  	if err == nil {
     7  		return nil
     8  	}
     9  
    10  	exitError, _ := err.(*exec.ExitError)
    11  
    12  	return exitError
    13  }