micro/util/http/options.go

16 lines
228 B
Go
Raw Normal View History

2019-05-31 01:52:10 +03:00
package http
import "github.com/unistack-org/micro/v3/router"
2019-05-31 01:52:10 +03:00
type Options struct {
Router router.Router
2019-05-31 01:52:10 +03:00
}
type Option func(*Options)
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
}
}