Add 'Files' field to the 'Config'. Add 'Value' field to the 'FieldParseError'

This commit is contained in:
2025-08-30 01:42:28 +04:00
parent 438e655311
commit fd7c4c6454
7 changed files with 142 additions and 75 deletions

View File

@@ -29,6 +29,7 @@ var Defaults = struct {
var SupportedProxySchemes []string = []string{"http", "socks5", "socks5h"}
type Config struct {
Files []types.ConfigFile
Method *string
URL *url.URL
Timeout *time.Duration
@@ -49,6 +50,7 @@ func NewConfig() *Config {
}
func (config *Config) MergeConfig(newConfig *Config) {
config.Files = append(config.Files, newConfig.Files...)
if newConfig.Method != nil {
config.Method = newConfig.Method
}