code: func warner(warnf func(string, ...interface{})) func(func() error) {
  	return func(f func() error) {
  		if err := f(); err != nil {
  			caller := runtime.FuncForPC(reflect.ValueOf(f).Pointer()).Name()
  			warnf("%s failed: %v\n", caller, err)
  		}
  	}
  }
docs: // warner enables printing a warning message in case a function call fails.
  // Given the warnf function (compatible with fmt.Printf) for printing warning messages it returns the actual warner.
  // The returned warner takes a possibly failing function "func() error" and prints a warning in case it failed.
  // The actual error is ignored.
  //
  // Example usage:
  //
  //  warn := warner(log.Printf)
  //  file, err := os.Open("file")
  //  if err != nil { return err }
  //  // do stuff
  //  defer warn(file.Close)