Skip to content

Commit

Permalink
chore(spanner): fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
toga4 committed Jul 3, 2023
1 parent 00fdce1 commit f1afc78
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions database/spanner/spanner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func isReady(ctx context.Context, c dktest.ContainerInfo) bool {
return false
}
ipAndPort := fmt.Sprintf("%s:%s", ip, port)
os.Setenv("SPANNER_EMULATOR_HOST", ipAndPort)
_ = os.Setenv("SPANNER_EMULATOR_HOST", ipAndPort)

if err := createInstance(ctx); err != nil {
return false
Expand All @@ -60,7 +60,9 @@ func createInstance(ctx context.Context) error {
if err != nil {
return err
}
defer ic.Close()
defer func() {
_ = ic.Close()
}()

giReq := &instancepb.GetInstanceRequest{

Check failure on line 67 in database/spanner/spanner_test.go

View workflow job for this annotation

GitHub Actions / lint

SA1019: instancepb.GetInstanceRequest is deprecated: Please use types in: cloud.google.com/go/spanner/admin/instance/apiv1/instancepb (staticcheck)
Name: fmt.Sprintf("projects/%s/instances/%s", projectId, instanceId),
Expand Down Expand Up @@ -95,7 +97,9 @@ func createDatabase(ctx context.Context) error {
if err != nil {
return err
}
defer ac.Close()
defer func() {
_ = ac.Close()
}()

req := &databasepb.CreateDatabaseRequest{

Check failure on line 104 in database/spanner/spanner_test.go

View workflow job for this annotation

GitHub Actions / lint

SA1019: databasepb.CreateDatabaseRequest is deprecated: Please use types in: cloud.google.com/go/spanner/admin/database/apiv1/databasepb (staticcheck)
Parent: fmt.Sprintf("projects/%s/instances/%s", projectId, instanceId),
Expand Down

0 comments on commit f1afc78

Please sign in to comment.