Fix HTTP tests

This commit is contained in:
Ben Toogood
2020-04-09 10:28:38 +01:00
parent 8ff86ae08b
commit f102aba4c1
4 changed files with 36 additions and 14 deletions

View File

@@ -7,7 +7,9 @@ import (
"github.com/micro/go-micro/v2/api/resolver"
)
type Resolver struct{}
type Resolver struct {
opts resolver.Options
}
func (r *Resolver) Resolve(req *http.Request) (*resolver.Endpoint, error) {
return &resolver.Endpoint{
@@ -23,5 +25,5 @@ func (r *Resolver) String() string {
}
func NewResolver(opts ...resolver.Option) resolver.Resolver {
return &Resolver{}
return &Resolver{opts: resolver.NewOptions(opts...)}
}