fix: fix the error output format

pull/1953/head
luhaoling 2 years ago
parent 80c4b6ce7b
commit 0ae6336501

@ -15,7 +15,6 @@
package genutil
import (
"errors"
"fmt"
"os"
"path/filepath"
@ -42,11 +41,8 @@ func OutDir(path string) (string, error) {
}
func ExitWithError(err error) {
if errors.Is(err, errors.New("SIGTERM EXIT")) {
os.Exit(-1)
}
progName := filepath.Base(os.Args[0])
fmt.Fprintf(os.Stderr, "\n\n%s exit -1: \n%+v\n\n", progName, err)
fmt.Fprintf(os.Stderr, "%s exit -1: %+v\n", progName, err)
os.Exit(-1)
}

Loading…
Cancel
Save