Remove deprecated function calls flagged by staticcheck (#3333)
* Use session.NewSession instead of session.New Signed-off-by: Erfan Besharat <erbesharat@gmail.com> * Use grpc.DialContext instead of grpc.WithTimeout Signed-off-by: Erfan Besharat <erbesharat@gmail.com> * Pass non-nil context to context.WithTimeout Signed-off-by: Erfan Besharat <erbesharat@gmail.com> * Return the error directly in route53 setup Co-Authored-By: Miek Gieben <miek@miek.nl> Signed-off-by: Erfan Besharat <erbesharat@gmail.com>
This commit is contained in:
parent
dbd1c047cb
commit
4ffbee299a
2 changed files with 9 additions and 2 deletions
|
@ -22,7 +22,8 @@ func TestGrpc(t *testing.T) {
|
|||
}
|
||||
defer g.Stop()
|
||||
|
||||
conn, err := grpc.Dial(tcp, grpc.WithInsecure(), grpc.WithBlock(), grpc.WithTimeout(5*time.Second))
|
||||
ctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
conn, err := grpc.DialContext(ctx, tcp, grpc.WithInsecure(), grpc.WithBlock())
|
||||
if err != nil {
|
||||
t.Fatalf("Expected no error but got: %s", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue