support wrapper slice in api server options

This commit is contained in:
Asim Aslam 2020-08-10 22:38:54 +01:00
parent 61d12d3a39
commit 959407bad9

View File

@ -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...)
}
}