diff options
author | Valery Piashchynski <[email protected]> | 2020-02-10 12:25:56 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-02-10 12:25:56 +0300 |
commit | 02be3eec1d8323a16031e86c1ddcc5c52c440176 (patch) | |
tree | ade1230c7d4b9a23997e414e6622094ceb0fb5fa /cmd/util/exit.go | |
parent | 809458f32ff2676e35027f6cce1cbf6ae768423a (diff) |
Add go.sum to VCS (it contains hashes, so, should be commited)
Return and process error from cprint and exit.go functions
Update build.sh, remove LDFLAGS and CGO directives
Diffstat (limited to 'cmd/util/exit.go')
-rw-r--r-- | cmd/util/exit.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/util/exit.go b/cmd/util/exit.go index 96fcbf3c..8871a483 100644 --- a/cmd/util/exit.go +++ b/cmd/util/exit.go @@ -6,6 +6,10 @@ import ( // ExitWithError prints error and exits with error code`. func ExitWithError(err error) { - Panicf("<red+hb>Error:</reset> <red>%s</reset>\n", err) + errP := Panicf("<red+hb>Error:</reset> <red>%s</reset>\n", err) + if errP != nil { + // in case of error during Panicf, print this error via build-int print function + println("error occurred during fmt.Fprint: " + err.Error()) + } os.Exit(1) } |