blob: 1fbda51f387aec4936a77ca784b1f03f48002079 [file] [log] [blame]
Scott Baker8487c5d2019-10-18 12:49:46 -07001package config
2
3import "fmt"
4
5// UnsupportedDirective error.
6type UnsupportedDirective struct {
7 text string
8}
9
10// Error implements the error interface for unsupported directives.
11func (e UnsupportedDirective) Error() string {
12 return e.text
13}
14
15// Invalid config error.
16type Invalid struct {
17 text string
18}
19
20// Error implements the error interface for invalid config error.
21func (e Invalid) Error() string {
22 return e.text
23}
24
25// InvalidErrorf creates a new Invalid error.
26func InvalidErrorf(format string, a ...interface{}) Invalid {
27 return Invalid{
28 text: fmt.Sprintf("invalid krb5 config "+format, a...),
29 }
30}