Skip to content

Commit

Permalink
Copy value interface from hat
Browse files Browse the repository at this point in the history
  • Loading branch information
pipe01 committed Jan 20, 2021
1 parent 40b0aef commit af23ed4
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,19 @@ type Config interface {
}

type Value interface {
Bool(def bool) bool
Int(def int) int
String(def string) string
Float64(def float64) float64
Duration(def time.Duration) time.Duration
Strings(def []string) []string
StringMap(def map[string]string) map[string]string
Scan(val interface{}) error
Error() error
Raw() string
Scan(v interface{}) error
String() (string, bool)
StringOr(def string) string
Int32() (int32, bool)
Int32Or(def int32) int32
Int64() (int64, bool)
Int64Or(def int64) int64
Bool() (bool, bool)
BoolOr(def bool) bool
Float64() (float64, bool)
Float64Or(def float64) float64
Duration() (time.Duration, bool)
DurationOr(def time.Duration) time.Duration
}

0 comments on commit af23ed4

Please sign in to comment.