...
1 package config
2
3 import (
4 "fmt"
5 )
6
7
8 type InvalidConfigFileError struct {
9 Path string
10 Err error
11 }
12
13
14 func (e *InvalidConfigFileError) Error() string {
15 return fmt.Sprintf("invalid config file %s: %s", e.Path, e.Err)
16 }
17
18
19 func (e *InvalidConfigFileError) Unwrap() error {
20 return e.Err
21 }
22
23
24
25 type KeyNotFoundError struct {
26 Key string
27 }
28
29
30 func (e *KeyNotFoundError) Error() string {
31 return fmt.Sprintf("could not find key %q", e.Key)
32 }
33
View as plain text