-
Notifications
You must be signed in to change notification settings - Fork 0
/
errors.go
23 lines (21 loc) · 1005 Bytes
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package deepcopy
import (
"errors"
)
// Errors may be returned from Copy function
var (
// ErrTypeInvalid returned when type of input var does not meet the requirement
ErrTypeInvalid = errors.New("ErrTypeInvalid")
// ErrTypeNonCopyable returned when the function can not perform copying between types
ErrTypeNonCopyable = errors.New("ErrTypeNonCopyable")
// ErrValueInvalid returned when input value does not meet the requirement
ErrValueInvalid = errors.New("ErrValueInvalid")
// ErrValueUnaddressable returned when value is `unaddressable` which is required
// in some situations such as when accessing an unexported struct field.
ErrValueUnaddressable = errors.New("ErrValueUnaddressable")
// ErrFieldRequireCopying returned when a field is required to be copied
// but no copying is done for it.
ErrFieldRequireCopying = errors.New("ErrFieldRequireCopying")
// ErrMethodInvalid returned when copying method of a struct is not valid
ErrMethodInvalid = errors.New("ErrMethodInvalid")
)