glide up
This commit is contained in:
6
vendor/github.com/go-kit/kit/examples/stringsvc1/main.go
generated
vendored
6
vendor/github.com/go-kit/kit/examples/stringsvc1/main.go
generated
vendored
@@ -1,13 +1,14 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"log"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
|
||||
"github.com/go-kit/kit/endpoint"
|
||||
httptransport "github.com/go-kit/kit/transport/http"
|
||||
)
|
||||
@@ -32,15 +33,18 @@ func (stringService) Count(s string) int {
|
||||
}
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
svc := stringService{}
|
||||
|
||||
uppercaseHandler := httptransport.NewServer(
|
||||
ctx,
|
||||
makeUppercaseEndpoint(svc),
|
||||
decodeUppercaseRequest,
|
||||
encodeResponse,
|
||||
)
|
||||
|
||||
countHandler := httptransport.NewServer(
|
||||
ctx,
|
||||
makeCountEndpoint(svc),
|
||||
decodeCountRequest,
|
||||
encodeResponse,
|
||||
|
Reference in New Issue
Block a user