-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.go
More file actions
30 lines (23 loc) · 777 Bytes
/
Copy patherrors.go
File metadata and controls
30 lines (23 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package fuse
import (
"fmt"
"github.com/himclix/fuse/validate"
)
// ValidationErrors is an alias for validate.ValidationErrors.
// Returned by Load when validation fails. Iterate to inspect individual errors.
type ValidationErrors = validate.ValidationErrors
// FieldError is an alias for validate.FieldError.
// Represents a single field's validation failure.
type FieldError = validate.FieldError
// ConfigError represents a failure during config loading (provider/parse/decode).
type ConfigError struct {
Provider string
Err error
}
func (e *ConfigError) Error() string {
if e.Provider != "" {
return fmt.Sprintf("fuse: provider %q: %v", e.Provider, e.Err)
}
return fmt.Sprintf("fuse: %v", e.Err)
}
func (e *ConfigError) Unwrap() error { return e.Err }