Support toml config

This commit is contained in:
Ming Deng
2020-10-11 23:22:19 +08:00
parent e44f16c672
commit 34d6a733e9
5 changed files with 766 additions and 1 deletions

View File

@@ -72,6 +72,8 @@ type Configer interface {
DefaultInt64(ctx context.Context, key string, defaultVal int64) int64
DefaultBool(ctx context.Context, key string, defaultVal bool) bool
DefaultFloat(ctx context.Context, key string, defaultVal float64) float64
// DIY return the original value
DIY(ctx context.Context, key string) (interface{}, error)
GetSection(ctx context.Context, section string) (map[string]string, error)