Skip to content

Commit

Permalink
Merge branch 'main' into update-bazel-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
quartzmo committed May 6, 2024
2 parents 4e4c89d + 27f02ea commit a4b709a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ switched_rules_by_language(name = "com_google_googleapis_imports", go = True, gr

http_archive(
name = "io_bazel_rules_go",
sha256 = "80a98277ad1311dacd837f9b16db62887702e9f1d1c4c9f796d0121a46c8e184",
sha256 = "af47f30e9cbd70ae34e49866e201b3f77069abb111183f2c0297e7e74ba6bbc0",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.46.0/rules_go-v0.46.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.46.0/rules_go-v0.46.0.zip",
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.47.0/rules_go-v0.47.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.47.0/rules_go-v0.47.0.zip",
],
)

Expand Down
3 changes: 2 additions & 1 deletion internal/gencli/service_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
"github.com/spf13/viper"
"google.golang.org/api/option"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"golang.org/x/oauth2"
{{ range $key, $pkg := .Imports}}
{{ $pkg.Name }} "{{ $pkg.Path }}"
Expand Down Expand Up @@ -89,7 +90,7 @@ var {{ $serviceCmdVar }} = &cobra.Command{
return fmt.Errorf("Missing address to use with insecure connection")
}
conn, err := grpc.Dial(address, grpc.WithInsecure())
conn, err := grpc.Dial(address, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
return err
}
Expand Down
3 changes: 2 additions & 1 deletion internal/gencli/testdata/service_file.want
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"golang.org/x/oauth2"
"google.golang.org/api/option"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"

proto "github.com/golang/protobuf/proto"
)
Expand Down Expand Up @@ -63,7 +64,7 @@ var TodoServiceCmd = &cobra.Command{
return fmt.Errorf("Missing address to use with insecure connection")
}

conn, err := grpc.Dial(address, grpc.WithInsecure())
conn, err := grpc.Dial(address, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
return err
}
Expand Down
3 changes: 2 additions & 1 deletion showcase/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
showcase "github.com/googleapis/gapic-showcase/client"
"google.golang.org/api/option"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)

func init() {
Expand All @@ -47,7 +48,7 @@ var restClientOpts = []option.ClientOption{
func TestMain(m *testing.M) {
flag.Parse()

conn, err := grpc.Dial("localhost:7469", grpc.WithInsecure())
conn, err := grpc.Dial("localhost:7469", grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
log.Fatal(err)
}
Expand Down

0 comments on commit a4b709a

Please sign in to comment.