chore: update option checks to use IsZeroOptions

This commit is contained in:
wwqgtxx
2025-04-17 21:06:55 +08:00
parent 76052b5b26
commit 30d90d49f0
5 changed files with 15 additions and 7 deletions

View File

@@ -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{}
}