mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-02-26 16:57:08 +00:00
chore: update option checks to use IsZeroOptions
This commit is contained in:
@@ -115,3 +115,11 @@ func WithOption(o option) Option {
|
||||
*opt = o
|
||||
}
|
||||
}
|
||||
|
||||
func IsZeroOptions(opts []Option) bool {
|
||||
var opt option
|
||||
for _, o := range opts {
|
||||
o(&opt)
|
||||
}
|
||||
return opt == option{}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user