Small code enhancements

This commit is contained in:
Michael 2018-08-06 20:00:03 +02:00 committed by Traefiker Bot
parent 015cd7a3d0
commit 9cd47dd2aa
41 changed files with 187 additions and 85 deletions

View file

@ -13,6 +13,7 @@ import (
"github.com/containous/traefik/integration/helloworld"
"github.com/containous/traefik/integration/try"
"github.com/containous/traefik/log"
"github.com/go-check/check"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
@ -47,7 +48,11 @@ func (s *myserver) StreamExample(in *helloworld.StreamExampleRequest, server hel
for i := range data {
data[i] = randCharset[rand.Intn(len(randCharset))]
}
server.Send(&helloworld.StreamExampleReply{Data: string(data)})
if err := server.Send(&helloworld.StreamExampleReply{Data: string(data)}); err != nil {
log.Error(err)
}
<-s.stopStreamExample
return nil
}