From a01b7ae6577fcca9e0b751c14cbb4a9f9a67d035 Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Thu, 28 Apr 2016 13:16:47 -0700 Subject: [PATCH] Deprecate CheckFatal in favour of assert package. --- lib/lib.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/lib.go b/lib/lib.go index 1096e0b..74eaa46 100644 --- a/lib/lib.go +++ b/lib/lib.go @@ -13,7 +13,7 @@ var progname = filepath.Base(os.Args[0]) // ProgName returns what lib thinks the program name is, namely the // basename of of argv0. // -// It is similar to the Linux __progname. +// It is similar to the Linux __progname function. func ProgName() string { return progname } @@ -55,15 +55,6 @@ func Err(exit int, err error, format string, a ...interface{}) { os.Exit(exit) } -// CheckFatal calls Err if err isn't nil. -func CheckFatal(err error, format string, a ...interface{}) { - if err == nil { - return - } - - Err(ExitFailure, err, format, a...) -} - // Itoa provides cheap integer to fixed-width decimal ASCII. Give a // negative width to avoid zero-padding. Adapted from the 'itoa' // function in the log/log.go file in the standard library.