feat: support output
This commit is contained in:
@@ -16,12 +16,13 @@ type Config struct {
|
||||
LogFile string `mapstructure:"log_file"`
|
||||
MaxSize string `mapstructure:"max_size"`
|
||||
DSN string `mapstructure:"dsn"`
|
||||
Outputs string `mapstructure:"outputs"`
|
||||
}
|
||||
|
||||
// GetMaxSize
|
||||
func (c *Config) GetMaxSize() uint {
|
||||
// parse 50m to 50 * 1024 * 1024
|
||||
return viper.GetSizeInBytes(c.MaxSize)
|
||||
// parse 50mb to 50 * 1024 * 1024
|
||||
return viper.GetSizeInBytes("max_size")
|
||||
}
|
||||
|
||||
func Load(path string) error {
|
||||
|
||||
Reference in New Issue
Block a user