-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.go
More file actions
45 lines (34 loc) · 763 Bytes
/
types.go
File metadata and controls
45 lines (34 loc) · 763 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
36
37
38
39
40
41
42
43
44
45
package confy
import (
"errors"
"math"
)
type loader[T any] interface {
apply(current *T) (bool, error)
}
type ConfigType string
const (
Yaml ConfigType = "yaml"
Json ConfigType = "json"
Toml ConfigType = "toml"
Auto ConfigType = "auto"
)
type preference string
const (
cli preference = "cli"
env preference = "env"
configFile preference = "file"
)
const (
confyTag = "confy"
confyDescriptionTag = "confy_description"
)
const (
// The default delimiter used for environment variable search
ENVDelimiter = "_"
// the default delimiter used for cli flag construction
CLIDelimiter = "."
LoggingDisabled = math.MaxInt
)
type Transform func(generated string) string
var errFatal = errors.New("fatal confy error: ")