micro/util/http/options.go

19 lines
297 B
Go
Raw Normal View History

2019-05-31 01:52:10 +03:00
package http
import "go.unistack.org/micro/v4/router"
2019-05-31 01:52:10 +03:00
// Options struct
2019-05-31 01:52:10 +03:00
type Options struct {
Router router.Router
2019-05-31 01:52:10 +03:00
}
// Option func
2019-05-31 01:52:10 +03:00
type Option func(*Options)
// WithRouter sets the router.Router option
func WithRouter(r router.Router) Option {
2019-05-31 01:52:10 +03:00
return func(o *Options) {
o.Router = r
2019-05-31 01:52:10 +03:00
}
}