micro/util/http/options.go

16 lines
224 B
Go
Raw Normal View History

2019-05-30 23:52:10 +01:00
package http
import "github.com/micro/go-micro/v2/router"
2019-05-30 23:52:10 +01:00
type Options struct {
Router router.Router
2019-05-30 23:52:10 +01:00
}
type Option func(*Options)
func WithRouter(r router.Router) Option {
2019-05-30 23:52:10 +01:00
return func(o *Options) {
o.Router = r
2019-05-30 23:52:10 +01:00
}
}