switch to go vendoring
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"go-micro.dev/v4/api/router"
|
||||
)
|
||||
|
||||
func NewOptions(opts ...Option) Options {
|
||||
options := Options{
|
||||
Address: ":8080",
|
||||
}
|
||||
|
||||
for _, o := range opts {
|
||||
o(&options)
|
||||
}
|
||||
|
||||
return options
|
||||
}
|
||||
|
||||
// WithRouter sets the router to use e.g static or registry
|
||||
func WithRouter(r router.Router) Option {
|
||||
return func(o *Options) error {
|
||||
o.Router = r
|
||||
return nil
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user