update config parsing

This commit is contained in:
ginuerzh
2022-02-07 22:15:16 +08:00
parent 0983ecc52f
commit 1ec10ff7dd
23 changed files with 846 additions and 534 deletions

View File

@ -13,7 +13,7 @@ import (
type Options struct {
Retries int
Chain *chain.Chain
Chain chain.Chainer
Resolver resolver.Resolver
Hosts hosts.HostMapper
Bypass bypass.Bypass
@ -30,7 +30,7 @@ func RetriesOption(retries int) Option {
}
}
func ChainOption(chain *chain.Chain) Option {
func ChainOption(chain chain.Chainer) Option {
return func(opts *Options) {
opts.Chain = chain
}