Cleans doc
This commit is contained in:
5
utils.go
5
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())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user