1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-02-05 13:15:11 +02:00

fix handler options (#941)

This commit is contained in:
Tony Chen 2021-05-22 13:46:30 +08:00 committed by GitHub
parent e2031dcfe6
commit 15d0f22fb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,6 +102,9 @@ func NewHandler(handler interface{}, opts ...HandleOption) http.Handler {
out: typ.Out(0).Elem(),
opts: DefaultHandleOptions(),
}
for _, o := range opts {
o(&h.opts)
}
return h
}