mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 01:43:16 +01:00
26 lines
526 B
Go
26 lines
526 B
Go
package lncfg
|
|
|
|
import "fmt"
|
|
|
|
// UsageError is an error type that signals a problem with the supplied flags.
|
|
type UsageError struct {
|
|
Err error
|
|
}
|
|
|
|
// Error returns the error string.
|
|
//
|
|
// NOTE: This is part of the error interface.
|
|
func (u *UsageError) Error() string {
|
|
return u.Err.Error()
|
|
}
|
|
|
|
// Unwrap returns the underlying error.
|
|
func (u *UsageError) Unwrap() error {
|
|
return u.Err
|
|
}
|
|
|
|
// mkErr creates a new error from a string.
|
|
func mkErr(format string, args ...interface{}) error {
|
|
return fmt.Errorf(format, args...)
|
|
}
|