blob: 1fbda51f387aec4936a77ca784b1f03f48002079 [file] [log] [blame]
Pragya Arya324337e2020-02-20 14:35:08 +05301package 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}