Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions src/product-catalog/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@

// GetProduct will fail on a specific product when feature flag is enabled
if p.checkProductFailure(ctx, req.Id) {
msg := fmt.Sprintf("Error: Product Catalog Fail Feature Flag Enabled")

Check failure on line 255 in src/product-catalog/main.go

View workflow job for this annotation

GitHub Actions / code-quality

S1039: unnecessary use of fmt.Sprintf (gosimple)
span.SetStatus(otelcodes.Error, msg)
span.AddEvent(msg)
return nil, status.Errorf(codes.Internal, msg)
Expand Down Expand Up @@ -309,8 +309,8 @@
return failureEnabled
}

func createClient(ctx context.Context, svcAddr string) (*grpc.ClientConn, error) {

Check failure on line 312 in src/product-catalog/main.go

View workflow job for this annotation

GitHub Actions / code-quality

func `createClient` is unused (unused)
return grpc.DialContext(ctx, svcAddr,

Check failure on line 313 in src/product-catalog/main.go

View workflow job for this annotation

GitHub Actions / code-quality

SA1019: grpc.DialContext is deprecated: use NewClient instead. Will be supported throughout 1.x. (staticcheck)
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithStatsHandler(otelgrpc.NewClientHandler()),
)
Expand All @@ -326,3 +326,33 @@

































Loading