Cleans doc

This commit is contained in:
2016-01-21 09:58:37 +01:00
parent 5a44613055
commit c6a16804cc

View File

@@ -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())
}