Small code enhancements
This commit is contained in:
parent
015cd7a3d0
commit
9cd47dd2aa
41 changed files with 187 additions and 85 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue