mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-05-10 17:52:44 +08:00
refactor: update config and readme
This commit is contained in:
@@ -8,9 +8,7 @@ import (
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
Threads int `toml:"threads" mapstructure:"threads"`
|
||||
Workers int `toml:"workers" mapstructure:"workers"`
|
||||
ChunkSize int32 `toml:"chunk_size" mapstructure:"chunk_size"`
|
||||
Workers int `toml:"workers" mapstructure:"workers"`
|
||||
|
||||
Temp tempConfig `toml:"temp" mapstructure:"temp"`
|
||||
Log logConfig `toml:"log" mapstructure:"log"`
|
||||
@@ -76,9 +74,7 @@ func Init() {
|
||||
viper.AddConfigPath(".")
|
||||
viper.SetConfigType("toml")
|
||||
|
||||
viper.SetDefault("threads", 3)
|
||||
viper.SetDefault("workers", 3)
|
||||
viper.SetDefault("chunk_size", 1024*1024)
|
||||
|
||||
viper.SetDefault("temp.base_path", "cache/")
|
||||
viper.SetDefault("temp.cache_ttl", 3600)
|
||||
|
||||
Reference in New Issue
Block a user