Skip to content

Commit 7638791

Browse files
committed
add route customizer to gmux adapter
1 parent e83ecf8 commit 7638791

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

adapters/humamux/options.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@ import (
77

88
type Option func(*options)
99

10+
// WithRouteCustomizer allows customizing a mux route, like adding HTTP middlewares.
1011
func WithRouteCustomizer(f func(op *huma.Operation, r *mux.Route)) Option {
1112
return func(o *options) {
1213
o.routeCustomizer = f
1314
}
1415
}
1516

17+
// options
18+
1619
func parseOptions(optionList []Option) options {
1720
var optns options
1821
for _, opt := range optionList {

0 commit comments

Comments
 (0)