-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherrors.go
31 lines (25 loc) · 830 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
24
25
26
27
28
29
30
31
package gotimeparser
// EmptyInputError represents empty input in Parse function.
type EmptyInputError struct {
message string
}
// Implementation of the error type for EmptyInputError struct.
func (e EmptyInputError) Error() string {
return e.message
}
// UnknownFormatError returned when we did not find any supported format to parse the time.
type UnknownFormatError struct {
message string
}
// Implementation of the error type for UnknownFormatError struct.
func (e UnknownFormatError) Error() string {
return e.message
}
// UnknownLayoutError returned from `ParseLayouts` and `ParseAllLayouts` when supported layout was not found.
type UnknownLayoutError struct {
message string
}
// Implementation of the error type for UnknownLayoutError struct.
func (e UnknownLayoutError) Error() string {
return e.message
}