chore: update linter
This commit is contained in:
parent
12e50e20e6
commit
553ef94047
46 changed files with 129 additions and 105 deletions
|
@ -3,6 +3,7 @@ package integration
|
|||
import (
|
||||
"crypto/md5"
|
||||
"crypto/rand"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
|
@ -265,7 +266,8 @@ func getMD5(data string) string {
|
|||
if _, err := digest.Write([]byte(data)); err != nil {
|
||||
log.WithoutContext().Error(err)
|
||||
}
|
||||
return fmt.Sprintf("%x", digest.Sum(nil))
|
||||
|
||||
return hex.EncodeToString(digest.Sum(nil))
|
||||
}
|
||||
|
||||
func getCnonce() string {
|
||||
|
@ -273,7 +275,8 @@ func getCnonce() string {
|
|||
if _, err := io.ReadFull(rand.Reader, b); err != nil {
|
||||
log.WithoutContext().Error(err)
|
||||
}
|
||||
return fmt.Sprintf("%x", b)[:16]
|
||||
|
||||
return hex.EncodeToString(b)[:16]
|
||||
}
|
||||
|
||||
func getDigestAuthorization(digestParts map[string]string) string {
|
||||
|
|
|
@ -42,7 +42,7 @@ func (s *GRPCSuite) SetUpSuite(c *check.C) {
|
|||
}
|
||||
|
||||
func (s *myserver) SayHello(ctx context.Context, in *helloworld.HelloRequest) (*helloworld.HelloReply, error) {
|
||||
return &helloworld.HelloReply{Message: "Hello " + in.Name}, nil
|
||||
return &helloworld.HelloReply{Message: "Hello " + in.GetName()}, nil
|
||||
}
|
||||
|
||||
func (s *myserver) StreamExample(in *helloworld.StreamExampleRequest, server helloworld.Greeter_StreamExampleServer) error {
|
||||
|
@ -121,7 +121,7 @@ func callHelloClientGRPC(name string, secure bool) (string, error) {
|
|||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return r.Message, nil
|
||||
return r.GetMessage(), nil
|
||||
}
|
||||
|
||||
func callStreamExampleClientGRPC() (helloworld.Greeter_StreamExampleClient, func() error, error) {
|
||||
|
@ -351,7 +351,7 @@ func (s *GRPCSuite) TestGRPCBuffer(c *check.C) {
|
|||
go func() {
|
||||
tr, err := client.Recv()
|
||||
c.Assert(err, check.IsNil)
|
||||
c.Assert(len(tr.Data), check.Equals, 512)
|
||||
c.Assert(len(tr.GetData()), check.Equals, 512)
|
||||
received <- true
|
||||
}()
|
||||
|
||||
|
@ -414,7 +414,7 @@ func (s *GRPCSuite) TestGRPCBufferWithFlushInterval(c *check.C) {
|
|||
go func() {
|
||||
tr, err := client.Recv()
|
||||
c.Assert(err, check.IsNil)
|
||||
c.Assert(len(tr.Data), check.Equals, 512)
|
||||
c.Assert(len(tr.GetData()), check.Equals, 512)
|
||||
received <- true
|
||||
}()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue