-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.go
More file actions
28 lines (21 loc) · 1.02 KB
/
Copy patherrors.go
File metadata and controls
28 lines (21 loc) · 1.02 KB
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
package env
import "errors"
// Sentinel errors returned by the package. Test for them with errors.Is.
var (
// ErrNilObject is returned when the object passed to Unmarshal or
// Marshal is nil.
ErrNilObject = errors.New("env: object is nil")
// ErrNotPointer is returned when the object is not a non-nil pointer
// to a struct.
ErrNotPointer = errors.New("env: object must be a non-nil pointer to a struct")
// ErrNotStruct is returned when the object does not point to a struct.
ErrNotStruct = errors.New("env: object must be a pointer to a struct")
// ErrEmptyStruct is returned when the struct has no fields.
ErrEmptyStruct = errors.New("env: struct has no fields")
// ErrInvalidObject is returned by Marshal when the object is not a
// struct or a pointer to a struct.
ErrInvalidObject = errors.New("env: object must be a struct or a pointer to a struct")
// ErrRequired is returned when a field tagged as required has no value
// in the source and no default.
ErrRequired = errors.New("env: required key is not set")
)