-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.go
More file actions
35 lines (25 loc) · 738 Bytes
/
Copy patherrors.go
File metadata and controls
35 lines (25 loc) · 738 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
31
32
33
34
35
package z85
import (
"fmt"
)
type InsufficientDestinationLengthError struct {
want, got int
}
func (e InsufficientDestinationLengthError) Error() string {
return fmt.Sprintf("z85: insufficient destination length: %d < %d", e.got, e.want)
}
type InvalidEncodedLengthError int
func (e InvalidEncodedLengthError) Error() string {
return fmt.Sprintf("z85: invalid encoded length: %d", int(e))
}
type InvalidEncodedByteError byte
func (e InvalidEncodedByteError) Error() string {
return fmt.Sprintf("z85: invalid encoded byte: %#U", rune(e))
}
type InvalidPostfixError byte
func (e InvalidPostfixError) Error() string {
if e == 0 {
return "z85: invalid postfix"
}
return fmt.Sprintf("z85: invalid postfix: %#U", rune(e))
}