Errorf returns an error implementing Error, returning code from Errno.
(code Errno, msg string, v ...interface{})
| 463 | |
| 464 | // Errorf returns an error implementing Error, returning code from Errno. |
| 465 | func Errorf(code Errno, msg string, v ...interface{}) Error { |
| 466 | if len(v) > 0 { |
| 467 | return errf{code, fmt.Errorf(msg, v...)} |
| 468 | } |
| 469 | return errf{code, errors.New(msg)} |
| 470 | } |
| 471 | |
| 472 | const ( |
| 473 | cmdFlagFUA = 1 << 0 |