...
1
2
3
4 package localizer
5
6 import "fmt"
7
8 type ResourceLoadError struct {
9 InlineError error
10 FileError error
11 }
12
13 func (rle ResourceLoadError) Error() string {
14 return fmt.Sprintf(`when parsing as inline received error: %s
15 when parsing as filepath received error: %s`, rle.InlineError, rle.FileError)
16 }
17
18 type PathLocalizeError struct {
19 Path string
20 FileError error
21 RootError error
22 }
23
24 func (ple PathLocalizeError) Error() string {
25 return fmt.Sprintf(`could not localize path %q as file: %s; could not localize path %q as directory: %s`,
26 ple.Path, ple.FileError, ple.Path, ple.RootError)
27 }
28
View as plain text