support wrapper slice in api server options
This commit is contained in:
parent
61d12d3a39
commit
959407bad9
@ -23,9 +23,9 @@ type Options struct {
|
||||
|
||||
type Wrapper func(h http.Handler) http.Handler
|
||||
|
||||
func WrapHandler(w Wrapper) Option {
|
||||
func WrapHandler(w ...Wrapper) Option {
|
||||
return func(o *Options) {
|
||||
o.Wrappers = append(o.Wrappers, w)
|
||||
o.Wrappers = append(o.Wrappers, w...)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user