From 21440ca22aa514cd33d4a7fa031d8ee38bd5d49a Mon Sep 17 00:00:00 2001 From: Mmx233 Date: Wed, 2 Mar 2022 19:39:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=83=A8=E5=88=86=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E8=A2=AB=E6=AD=A3=E7=A1=AE=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/config.go | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/models/config.go b/models/config.go index 8bb6fae..3e5b0a5 100644 --- a/models/config.go +++ b/models/config.go @@ -3,37 +3,37 @@ package srunModels import "github.com/Mmx233/BitSrunLoginGo/v1/transfer" type Daemon struct { - Enable bool `json:"enable"` - Path string `json:"path"` + Enable bool `json:"enable" yaml:"enable" mapstructure:"enable"` + Path string `json:"path" yaml:"path" mapstructure:"path"` } type Guardian struct { - Enable bool `json:"enable"` - Duration uint `json:"duration"` + Enable bool `json:"enable" yaml:"enable" mapstructure:"enable"` + Duration uint `json:"duration" yaml:"duration" mapstructure:"duration"` } type Basic struct { - Https bool `json:"https"` - Timeout uint `json:"timeout"` - Interfaces string `json:"interfaces"` - SkipNetCheck bool `json:"skip_net_check" yaml:"skip_net_check"` + Https bool `json:"https" yaml:"https" mapstructure:"https"` + Timeout uint `json:"timeout" yaml:"timeout" mapstructure:"timeout"` + Interfaces string `json:"interfaces" yaml:"interfaces" mapstructure:"interfaces"` + SkipNetCheck bool `json:"skip_net_check" yaml:"skip_net_check" mapstructure:"skip_net_check"` } type Settings struct { - Basic Basic `json:"basic"` - Guardian Guardian `json:"guardian"` - Daemon Daemon `json:"daemon"` - Debug Debug + Basic Basic `json:"basic" yaml:"basic" mapstructure:"basic"` + Guardian Guardian `json:"guardian" yaml:"guardian" mapstructure:"guardian"` + Daemon Daemon `json:"daemon" yaml:"daemon" mapstructure:"daemon"` + Debug Debug `json:"debug" yaml:"debug" mapstructure:"debug"` } type Debug struct { - Enable bool `json:"enable"` - WriteLog bool `json:"write_log" yaml:"write_log"` - LogPath string `json:"log_path" yaml:"log_path"` + Enable bool `json:"enable" yaml:"enable" mapstructure:"enable"` + WriteLog bool `json:"write_log" yaml:"write_log" mapstructure:"write_log"` + LogPath string `json:"log_path" yaml:"log_path" mapstructure:"log_path"` } type Config struct { - Form srunTransfer.LoginForm `json:"form"` - Meta srunTransfer.LoginMeta `json:"meta"` - Settings Settings `json:"settings"` + Form srunTransfer.LoginForm `json:"form" yaml:"form" mapstructure:"form"` + Meta srunTransfer.LoginMeta `json:"meta" yaml:"meta" mapstructure:"meta"` + Settings Settings `json:"settings" yaml:"settings" mapstructure:"settings"` }