From c6a16804cc8429dbedc858ac71e24bb7b7eaa13f Mon Sep 17 00:00:00 2001 From: Alexandre Tuleu Date: Thu, 21 Jan 2016 09:58:37 +0100 Subject: [PATCH] Cleans doc --- utils.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils.go b/utils.go index 23a4682..20852f2 100644 --- a/utils.go +++ b/utils.go @@ -19,17 +19,18 @@ func closeIgnore(c io.Closer) { c.Close() } +// close or log the failure. need to provide the %s in format func closeOrLog(c io.Closer, format string) { if err := c.Close(); err != nil { log.Printf(format, err) } } -// retrun a nice not yet implemented error +// return a nice not yet implemented error func notYetImplemented() error { pc, _, _, ok := runtime.Caller(1) if ok == false { return fmt.Errorf("notYetImplemented() cshould not be called from static context") } - return fmt.Errorf("%s is not yet implemented", runtime.FuncForPC(pc)) + return fmt.Errorf("%s is not yet implemented", runtime.FuncForPC(pc).Name()) }