diff --git a/mains/generate.go b/mains/generate.go index cb09e4638..f0afc01c6 100644 --- a/mains/generate.go +++ b/mains/generate.go @@ -34,6 +34,8 @@ type srvInfo struct { HasHTTP bool HasGRPC bool ServerName string + // FSCounts maps service name to the number of HTTP file servers. + FSCounts map[string]int } // svcT provides template data for each service imported by a server. @@ -50,6 +52,9 @@ type svcT struct { HasWebSocket bool HasHTTP bool HasGRPC bool + // FileServerNils is used by the template to emit one trailing + // nil argument per HTTP file server in the service. + FileServerNils []int } // Register the plugin for the example phase. @@ -110,15 +115,26 @@ func generateExample(genpkg string, roots []eval.Root, files []*codegen.File) ([ } if len(httpSvcs) == 0 { continue } var svcs []*service.Data - for _, sd := range httpSvcs { if sd != nil && sd.Service != nil { svcs = append(svcs, sd.Service) } } + fsCounts := map[string]int{} + for _, sd := range httpSvcs { + if sd == nil || sd.Service == nil { + continue + } + svcs = append(svcs, sd.Service) + if sd.FileServers != nil { + fsCounts[sd.Service.Name] = len(sd.FileServers) + } + } hasWS := httpcodegen.NeedDialer(httpSvcs) apipkg := apiPkgAlias(genpkg, roots) if info, ok := srvMap[dir]; ok { info.HasWS = hasWS info.HasHTTP = true if info.APIPkg == "" { info.APIPkg = apipkg } + if info.FSCounts == nil { info.FSCounts = map[string]int{} } + for k, v := range fsCounts { info.FSCounts[k] = v } } else { - srvMap[dir] = &srvInfo{Dir: dir, APIPkg: apipkg, Services: svcs, HasWS: hasWS, HasHTTP: true} + srvMap[dir] = &srvInfo{Dir: dir, APIPkg: apipkg, Services: svcs, HasWS: hasWS, HasHTTP: true, FSCounts: fsCounts} } } // Detect gRPC servers from grpc.go files @@ -228,6 +244,12 @@ func generateExample(genpkg string, roots []eval.Root, files []*codegen.File) ([ hasAnyWS = true } + // Determine file server count: prefer extracted counts from example + // HTTP files, fallback to design counts when missing. + fsn, ok := info.FSCounts[sd.Name] + if !ok { + fsn = httpFileServerCounts(roots)[sd.Name] + } svcsData = append(svcsData, svcT{ Name: sd.Name, StructName: sd.StructName, @@ -241,6 +263,7 @@ func generateExample(genpkg string, roots []eval.Root, files []*codegen.File) ([ HasWebSocket: hws, HasHTTP: hasHTTP, HasGRPC: hasGRPC, + FileServerNils: func(n int) []int { if n <= 0 { return nil }; s := make([]int, n); for i := range s { s[i] = i }; return s }(fsn), }) } @@ -354,7 +377,7 @@ func httpServicesByName(roots []eval.Root) map[string]bool { continue } for _, svc := range root.API.HTTP.Services { - if len(svc.HTTPEndpoints) > 0 { + if len(svc.HTTPEndpoints) > 0 || len(svc.FileServers) > 0 { hasHTTP[svc.Name()] = true } } @@ -378,3 +401,22 @@ func grpcServicesByName(roots []eval.Root) map[string]bool { } return hasGRPC } + +// httpFileServerCounts returns a map from service name to the number of +// HTTP Files() endpoints defined for that service. +func httpFileServerCounts(roots []eval.Root) map[string]int { + counts := map[string]int{} + for _, r := range roots { + root, ok := r.(*expr.RootExpr) + if !ok || root.API == nil || root.API.HTTP == nil { + continue + } + for _, svc := range root.API.HTTP.Services { + if svc == nil { + continue + } + counts[svc.Name()] = len(svc.FileServers) + } + } + return counts +} diff --git a/mains/generate_test.go b/mains/generate_test.go index a1352008d..80bebc2d9 100644 --- a/mains/generate_test.go +++ b/mains/generate_test.go @@ -1,11 +1,12 @@ package mains import ( + "bytes" + "regexp" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "bytes" "goa.design/goa/v3/codegen" "goa.design/goa/v3/codegen/example" "goa.design/goa/v3/codegen/service" @@ -94,3 +95,36 @@ func TestWebSocketMainIncludesUpgrader(t *testing.T) { assert.Contains(t, code, "github.com/gorilla/websocket") assert.Contains(t, code, "websocket.Upgrader") } + +func TestMainsAddsFileServerNils(t *testing.T) { + root := codegen.RunDSL(t, testdata.FileServerServiceDSL) + svcs := service.NewServicesData(root) + httpSvcs := httpcodegen.NewServicesData(svcs, root.API.HTTP) + files := append(example.ServerFiles("gen", root, svcs), httpcodegen.ExampleServerFiles("gen", httpSvcs)...) + + out, err := Generate("gen", []eval.Root{root}, files) + require.NoError(t, err) + + // Expect relocated main under services/static/cmd/static/main.go + var mainFile *codegen.File + for _, f := range out { + if f.Path == "services/static/cmd/static/main.go" { + mainFile = f + break + } + } + require.NotNil(t, mainFile) + + // Render the mains section and look for exactly 2 (errhandler, formatter) + // + 3 (file servers) nil arguments at the end of the New(...) call. + sections := mainFile.Section("mains-main") + require.Greater(t, len(sections), 0) + var buf bytes.Buffer + require.NoError(t, sections[0].Write(&buf)) + code := buf.String() + + // Match a New(...) call that ends with five consecutive `, nil` args + // (2 standard + 3 file servers) + re := regexp.MustCompile(`New\([\s\S]*,\s*nil(?:,\s*nil){4}\)`) // total 5 nils + assert.Regexp(t, re, code) +} diff --git a/mains/templates/main.go.tpl b/mains/templates/main.go.tpl index 7852aae40..d4a2cd1e3 100644 --- a/mains/templates/main.go.tpl +++ b/mains/templates/main.go.tpl @@ -119,9 +119,9 @@ func main() { {{- if .HasHTTP }} // {{ .Name }} HTTP server {{- if .HasWebSocket }} - {{ .SrvVar }} := {{ .GenHTTPPkg }}.New({{ .EpVar }}, mux, goahttp.RequestDecoder, goahttp.ResponseEncoder, nil, nil, upgrader, nil) + {{ .SrvVar }} := {{ .GenHTTPPkg }}.New({{ .EpVar }}, mux, goahttp.RequestDecoder, goahttp.ResponseEncoder, nil, nil, upgrader, nil{{- range .FileServerNils }}, nil{{- end }}) {{- else }} - {{ .SrvVar }} := {{ .GenHTTPPkg }}.New({{ .EpVar }}, mux, goahttp.RequestDecoder, goahttp.ResponseEncoder, nil, nil) + {{ .SrvVar }} := {{ .GenHTTPPkg }}.New({{ .EpVar }}, mux, goahttp.RequestDecoder, goahttp.ResponseEncoder, nil, nil{{- range .FileServerNils }}, nil{{- end }}) {{- end }} {{ .GenHTTPPkg }}.Mount(mux, {{ .SrvVar }}) for _, m := range {{ .SrvVar }}.Mounts { @@ -234,4 +234,3 @@ func main() { wg.Wait() log.Printf(ctx, "exited") } - diff --git a/mains/testdata/dsls.go b/mains/testdata/dsls.go index 5f22d1aa0..e191ea6b7 100644 --- a/mains/testdata/dsls.go +++ b/mains/testdata/dsls.go @@ -63,3 +63,20 @@ var WebSocketServiceDSL = func() { }) }) } + +// Single service with only Files() endpoints; used to validate mains adds the +// correct number of http.FileSystem arguments to the HTTP server constructor. +var FileServerServiceDSL = func() { + API("fsapi", func() { + Server("edge", func() { + Services("static") + Host("dev", func() { URI("http://localhost:8080") }) + }) + }) + Service("static", func() { + HTTP(func() { Path("/") }) + Files("/f1.json", "/assets/f1.json") + Files("/f2.json", "/assets/f2.json") + Files("/f3.json", "/assets/f3.json") + }) +} diff --git a/testing/codegen/clients.go b/testing/codegen/clients.go index c84772597..54fc83708 100644 --- a/testing/codegen/clients.go +++ b/testing/codegen/clients.go @@ -40,6 +40,8 @@ type ( HasGRPC bool // Method has gRPC transport HasJSONRPC bool // Method has JSON-RPC transport (any variant) IsStreaming bool // Method has streaming + // PkgResultRef is the package-qualified result type reference + PkgResultRef string } ) @@ -123,6 +125,9 @@ func buildClientData(svcData *service.Data, root *expr.RootExpr, svc *expr.Servi Methods: make([]*clientMethodData, 0, len(svcData.Methods)), } + // Create a name scope for type reference generation + scope := codegen.NewNameScope() + // Build method data with client-specific extensions for i, m := range svc.Methods { md := svcData.Methods[i] @@ -137,6 +142,12 @@ func buildClientData(svcData *service.Data, root *expr.RootExpr, svc *expr.Servi IsStreaming: md.StreamKind != expr.NoStreamKind, } + // Compute package-qualified result reference using Goa's GoFullTypeRef + // This properly handles arrays, maps, primitives, and user types + if m.Result != nil && m.Result.Type != expr.Empty { + cmd.PkgResultRef = scope.GoFullTypeRef(m.Result, svcData.PkgName) + } + // Analyze targets to determine available transports for _, target := range targets { if target.IsGRPC { diff --git a/testing/codegen/templates/client_methods.go.tpl b/testing/codegen/templates/client_methods.go.tpl index 8946a7393..1a21b2587 100644 --- a/testing/codegen/templates/client_methods.go.tpl +++ b/testing/codegen/templates/client_methods.go.tpl @@ -5,7 +5,7 @@ {{- if or $method.ServerStream $method.ClientStream }} func (c *Client) {{ $method.VarName }}(ctx context.Context{{- if and $method.PayloadRef (not $method.StreamingPayload) }}, p *{{ $.PkgName }}.{{ $method.Payload }}{{- end }}) ({{ $.PkgName }}.{{ $method.ClientStream.Interface }}, error) { {{- else }} -func (c *Client) {{ $method.VarName }}(ctx context.Context{{- if $method.PayloadRef }}, p *{{ $.PkgName }}.{{ $method.Payload }}{{- end }}) ({{- if $method.ResultRef }}*{{ $.PkgName }}.{{ $method.Result }}, {{ end }}error) { +func (c *Client) {{ $method.VarName }}(ctx context.Context{{- if $method.PayloadRef }}, p *{{ $.PkgName }}.{{ $method.Payload }}{{- end }}) ({{- if $method.PkgResultRef }}{{ $method.PkgResultRef }}, {{ end }}error) { {{- end }} // Determine which transport to use transport := c.transport @@ -62,7 +62,7 @@ func (c *Client) {{ $method.VarName }}(ctx context.Context{{- if $method.Payload if err != nil { return nil, err } - return res.(*{{ $.PkgName }}.{{ $method.Result }}), nil + return res.({{ $method.PkgResultRef }}), nil {{- else }} _, err := endpoint(ctx, {{- if $method.PayloadRef }}p{{ else }}nil{{ end }}) return err @@ -88,7 +88,7 @@ func (c *Client) {{ $method.VarName }}(ctx context.Context{{- if $method.Payload if err != nil { return nil, err } - return res.(*{{ $.PkgName }}.{{ $method.Result }}), nil + return res.({{ $method.PkgResultRef }}), nil {{- else }} _, err := endpoint(ctx, {{- if $method.PayloadRef }}p{{ else }}nil{{ end }}) return err @@ -129,7 +129,7 @@ func (c *Client) {{ $method.VarName }}(ctx context.Context{{- if $method.Payload if err != nil { return nil, err } - return res.(*{{ $.PkgName }}.{{ $method.Result }}), nil + return res.({{ $method.PkgResultRef }}), nil {{- else }} _, err := endpoint(ctx, {{- if $method.PayloadRef }}p{{ else }}nil{{ end }}) return err diff --git a/testing/examples/calculator/gen/calculator/calculatortest/client.go b/testing/examples/calculator/gen/calculator/calculatortest/client.go index de91e85d4..3a35681be 100644 --- a/testing/examples/calculator/gen/calculator/calculatortest/client.go +++ b/testing/examples/calculator/gen/calculator/calculatortest/client.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // Test client for calculator service // diff --git a/testing/examples/calculator/gen/calculator/calculatortest/errors.go b/testing/examples/calculator/gen/calculator/calculatortest/errors.go index ad6c2a517..ffbb7068e 100644 --- a/testing/examples/calculator/gen/calculator/calculatortest/errors.go +++ b/testing/examples/calculator/gen/calculator/calculatortest/errors.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // Error test helpers for calculator service // @@ -23,46 +23,46 @@ func NewErrorAsserter(t *testing.T) *ErrorAsserter { return &ErrorAsserter{t: t} } -// AssertInvalidInput asserts that the error is invalid_input. -// Input must be between 0 and 20 -// This error can be returned by: factorial -func (a *ErrorAsserter) AssertInvalidInput(err error) { +// AssertDivisionByZero asserts that the error is division_by_zero. +// Cannot divide by zero +// This error can be returned by: divide +func (a *ErrorAsserter) AssertDivisionByZero(err error) { a.t.Helper() if err == nil { - a.t.Errorf(`Expected invalid_input error, got nil`) + a.t.Errorf(`Expected division_by_zero error, got nil`) return } // Check if it's a Goa error with ErrorName method type errorNamer interface{ ErrorName() string } if en, ok := err.(errorNamer); ok { - if en.ErrorName() != "invalid_input" { - a.t.Errorf(`Expected invalid_input error, got %s`, en.ErrorName()) + if en.ErrorName() != "division_by_zero" { + a.t.Errorf(`Expected division_by_zero error, got %s`, en.ErrorName()) } return } // For HTTP transport errors, check the error message errMsg := err.Error() - if strings.Contains(errMsg, `"name":"invalid_input"`) { + if strings.Contains(errMsg, `"name":"division_by_zero"`) { // HTTP transport error contains the error name in JSON return } // For gRPC errors, check if it's the right error type - if strings.Contains(errMsg, "invalid_input") { + if strings.Contains(errMsg, "division_by_zero") { return } - a.t.Errorf(`Expected invalid_input error, got: %v`, err) + a.t.Errorf(`Expected division_by_zero error, got: %v`, err) } -// ExpectInvalidInput runs a function and asserts it returns invalid_input +// ExpectDivisionByZero runs a function and asserts it returns division_by_zero // error. -func (a *ErrorAsserter) ExpectInvalidInput(fn func() error) { +func (a *ErrorAsserter) ExpectDivisionByZero(fn func() error) { a.t.Helper() err := fn() - a.AssertInvalidInput(err) + a.AssertDivisionByZero(err) } // AssertEmptyList asserts that the error is empty_list. @@ -106,44 +106,44 @@ func (a *ErrorAsserter) ExpectEmptyList(fn func() error) { a.AssertEmptyList(err) } -// AssertDivisionByZero asserts that the error is division_by_zero. -// Cannot divide by zero -// This error can be returned by: divide -func (a *ErrorAsserter) AssertDivisionByZero(err error) { +// AssertInvalidInput asserts that the error is invalid_input. +// Input must be between 0 and 20 +// This error can be returned by: factorial +func (a *ErrorAsserter) AssertInvalidInput(err error) { a.t.Helper() if err == nil { - a.t.Errorf(`Expected division_by_zero error, got nil`) + a.t.Errorf(`Expected invalid_input error, got nil`) return } // Check if it's a Goa error with ErrorName method type errorNamer interface{ ErrorName() string } if en, ok := err.(errorNamer); ok { - if en.ErrorName() != "division_by_zero" { - a.t.Errorf(`Expected division_by_zero error, got %s`, en.ErrorName()) + if en.ErrorName() != "invalid_input" { + a.t.Errorf(`Expected invalid_input error, got %s`, en.ErrorName()) } return } // For HTTP transport errors, check the error message errMsg := err.Error() - if strings.Contains(errMsg, `"name":"division_by_zero"`) { + if strings.Contains(errMsg, `"name":"invalid_input"`) { // HTTP transport error contains the error name in JSON return } // For gRPC errors, check if it's the right error type - if strings.Contains(errMsg, "division_by_zero") { + if strings.Contains(errMsg, "invalid_input") { return } - a.t.Errorf(`Expected division_by_zero error, got: %v`, err) + a.t.Errorf(`Expected invalid_input error, got: %v`, err) } -// ExpectDivisionByZero runs a function and asserts it returns division_by_zero +// ExpectInvalidInput runs a function and asserts it returns invalid_input // error. -func (a *ErrorAsserter) ExpectDivisionByZero(fn func() error) { +func (a *ErrorAsserter) ExpectInvalidInput(fn func() error) { a.t.Helper() err := fn() - a.AssertDivisionByZero(err) + a.AssertInvalidInput(err) } diff --git a/testing/examples/calculator/gen/calculator/calculatortest/harness.go b/testing/examples/calculator/gen/calculator/calculatortest/harness.go index e72647bb6..a528a037d 100644 --- a/testing/examples/calculator/gen/calculator/calculatortest/harness.go +++ b/testing/examples/calculator/gen/calculator/calculatortest/harness.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // Test harness for calculator service // diff --git a/testing/examples/calculator/gen/calculator/calculatortest/scenarios.go b/testing/examples/calculator/gen/calculator/calculatortest/scenarios.go index f5e99fc33..29865183b 100644 --- a/testing/examples/calculator/gen/calculator/calculatortest/scenarios.go +++ b/testing/examples/calculator/gen/calculator/calculatortest/scenarios.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // Scenario runner for calculator service // @@ -77,8 +77,8 @@ var ValidTransports = []string{ var TransportAvailability = map[string][]string{ "add": {"grpc", "http"}, "divide": {"grpc", "http"}, - "factorial": {"http", "grpc"}, - "statistics": {"http", "grpc"}, + "factorial": {"grpc", "http"}, + "statistics": {"grpc", "http"}, "batch_add": {"grpc", "http-ws"}, } // ScenarioRunner executes test scenarios. type ScenarioRunner struct { diff --git a/testing/examples/calculator/gen/calculator/calculatortest/testdata.go b/testing/examples/calculator/gen/calculator/calculatortest/testdata.go index 71f00e561..d9e255690 100644 --- a/testing/examples/calculator/gen/calculator/calculatortest/testdata.go +++ b/testing/examples/calculator/gen/calculator/calculatortest/testdata.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // Test data generators for calculator service // diff --git a/testing/examples/calculator/gen/calculator/client.go b/testing/examples/calculator/gen/calculator/client.go index 1aa261198..dc9ee5945 100644 --- a/testing/examples/calculator/gen/calculator/client.go +++ b/testing/examples/calculator/gen/calculator/client.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // calculator client // diff --git a/testing/examples/calculator/gen/calculator/endpoints.go b/testing/examples/calculator/gen/calculator/endpoints.go index f8be51b30..62bdec6ee 100644 --- a/testing/examples/calculator/gen/calculator/endpoints.go +++ b/testing/examples/calculator/gen/calculator/endpoints.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // calculator endpoints // diff --git a/testing/examples/calculator/gen/calculator/service.go b/testing/examples/calculator/gen/calculator/service.go index b196a781e..fa3aa5ccb 100644 --- a/testing/examples/calculator/gen/calculator/service.go +++ b/testing/examples/calculator/gen/calculator/service.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // calculator service // @@ -46,8 +46,12 @@ var MethodNames = [5]string{"add", "divide", "factorial", "statistics", "batch_a type BatchAddServerStream interface { // Send streams instances of "BatchAddResult". Send(*BatchAddResult) error + // SendWithContext streams instances of "BatchAddResult" with context. SendWithContext(context.Context, *BatchAddResult) error + // Recv reads instances of "BatchAddStreamingPayload" from the stream. Recv() (*BatchAddStreamingPayload, error) + // RecvWithContext reads instances of "BatchAddStreamingPayload" from the + // stream with context. RecvWithContext(context.Context) (*BatchAddStreamingPayload, error) // Close closes the stream. Close() error @@ -58,8 +62,12 @@ type BatchAddServerStream interface { type BatchAddClientStream interface { // Send streams instances of "BatchAddStreamingPayload". Send(*BatchAddStreamingPayload) error + // SendWithContext streams instances of "BatchAddStreamingPayload" with context. SendWithContext(context.Context, *BatchAddStreamingPayload) error + // Recv reads instances of "BatchAddResult" from the stream. Recv() (*BatchAddResult, error) + // RecvWithContext reads instances of "BatchAddResult" from the stream with + // context. RecvWithContext(context.Context) (*BatchAddResult, error) // Close closes the stream. Close() error diff --git a/testing/examples/calculator/gen/grpc/calculator/client/cli.go b/testing/examples/calculator/gen/grpc/calculator/client/cli.go index 216b92d09..cc1d4c826 100644 --- a/testing/examples/calculator/gen/grpc/calculator/client/cli.go +++ b/testing/examples/calculator/gen/grpc/calculator/client/cli.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // calculator gRPC client CLI support package // diff --git a/testing/examples/calculator/gen/grpc/calculator/client/client.go b/testing/examples/calculator/gen/grpc/calculator/client/client.go index b4709cf6e..45d0c5714 100644 --- a/testing/examples/calculator/gen/grpc/calculator/client/client.go +++ b/testing/examples/calculator/gen/grpc/calculator/client/client.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // calculator gRPC client // @@ -11,6 +11,7 @@ import ( "context" goagrpc "goa.design/goa/v3/grpc" + goapb "goa.design/goa/v3/grpc/pb" goa "goa.design/goa/v3/pkg" calculator "goa.design/plugins/v3/testing/examples/calculator/gen/calculator" calculatorpb "goa.design/plugins/v3/testing/examples/calculator/gen/grpc/calculator/pb" @@ -46,6 +47,11 @@ func (c *Client) Add() goa.Endpoint { DecodeAddResponse) res, err := inv.Invoke(ctx, v) if err != nil { + // Try to decode a Goa error response detail before falling back to Fault. + resp := goagrpc.DecodeError(err) + if eresp, ok := resp.(*goapb.ErrorResponse); ok { + return nil, goagrpc.NewServiceError(eresp) + } return nil, goa.Fault("%s", err.Error()) } return res, nil @@ -62,6 +68,11 @@ func (c *Client) Divide() goa.Endpoint { DecodeDivideResponse) res, err := inv.Invoke(ctx, v) if err != nil { + // Try to decode a Goa error response detail before falling back to Fault. + resp := goagrpc.DecodeError(err) + if eresp, ok := resp.(*goapb.ErrorResponse); ok { + return nil, goagrpc.NewServiceError(eresp) + } return nil, goa.Fault("%s", err.Error()) } return res, nil @@ -78,6 +89,11 @@ func (c *Client) Factorial() goa.Endpoint { DecodeFactorialResponse) res, err := inv.Invoke(ctx, v) if err != nil { + // Try to decode a Goa error response detail before falling back to Fault. + resp := goagrpc.DecodeError(err) + if eresp, ok := resp.(*goapb.ErrorResponse); ok { + return nil, goagrpc.NewServiceError(eresp) + } return nil, goa.Fault("%s", err.Error()) } return res, nil @@ -94,6 +110,11 @@ func (c *Client) Statistics() goa.Endpoint { DecodeStatisticsResponse) res, err := inv.Invoke(ctx, v) if err != nil { + // Try to decode a Goa error response detail before falling back to Fault. + resp := goagrpc.DecodeError(err) + if eresp, ok := resp.(*goapb.ErrorResponse); ok { + return nil, goagrpc.NewServiceError(eresp) + } return nil, goa.Fault("%s", err.Error()) } return res, nil @@ -110,6 +131,11 @@ func (c *Client) BatchAdd() goa.Endpoint { DecodeBatchAddResponse) res, err := inv.Invoke(ctx, v) if err != nil { + // Try to decode a Goa error response detail before falling back to Fault. + resp := goagrpc.DecodeError(err) + if eresp, ok := resp.(*goapb.ErrorResponse); ok { + return nil, goagrpc.NewServiceError(eresp) + } return nil, goa.Fault("%s", err.Error()) } return res, nil diff --git a/testing/examples/calculator/gen/grpc/calculator/client/encode_decode.go b/testing/examples/calculator/gen/grpc/calculator/client/encode_decode.go index e995403af..56872dc9f 100644 --- a/testing/examples/calculator/gen/grpc/calculator/client/encode_decode.go +++ b/testing/examples/calculator/gen/grpc/calculator/client/encode_decode.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // calculator gRPC client encoders and decoders // diff --git a/testing/examples/calculator/gen/grpc/calculator/client/types.go b/testing/examples/calculator/gen/grpc/calculator/client/types.go index b51cc3ae3..7994cb7c3 100644 --- a/testing/examples/calculator/gen/grpc/calculator/client/types.go +++ b/testing/examples/calculator/gen/grpc/calculator/client/types.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // calculator gRPC client types // diff --git a/testing/examples/calculator/gen/grpc/calculator/pb/goagen_calculator_calculator.pb.go b/testing/examples/calculator/gen/grpc/calculator/pb/goagen_calculator_calculator.pb.go index e46813264..a6e8981da 100644 --- a/testing/examples/calculator/gen/grpc/calculator/pb/goagen_calculator_calculator.pb.go +++ b/testing/examples/calculator/gen/grpc/calculator/pb/goagen_calculator_calculator.pb.go @@ -1,4 +1,4 @@ -// Code generated with goa v3.22.1, DO NOT EDIT. +// Code generated with goa v3.22.6, DO NOT EDIT. // // calculator protocol buffer definition // @@ -7,8 +7,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc v5.29.3 +// protoc-gen-go v1.36.9 +// protoc v6.32.1 // source: goagen_calculator_calculator.proto package calculatorpb diff --git a/testing/examples/calculator/gen/grpc/calculator/pb/goagen_calculator_calculator.proto b/testing/examples/calculator/gen/grpc/calculator/pb/goagen_calculator_calculator.proto index 4ecd8304c..c50e3296d 100644 --- a/testing/examples/calculator/gen/grpc/calculator/pb/goagen_calculator_calculator.proto +++ b/testing/examples/calculator/gen/grpc/calculator/pb/goagen_calculator_calculator.proto @@ -1,4 +1,4 @@ -// Code generated with goa v3.22.1, DO NOT EDIT. +// Code generated with goa v3.22.6, DO NOT EDIT. // // calculator protocol buffer definition // diff --git a/testing/examples/calculator/gen/grpc/calculator/pb/goagen_calculator_calculator_grpc.pb.go b/testing/examples/calculator/gen/grpc/calculator/pb/goagen_calculator_calculator_grpc.pb.go index 634eb7bcc..7bc5a575e 100644 --- a/testing/examples/calculator/gen/grpc/calculator/pb/goagen_calculator_calculator_grpc.pb.go +++ b/testing/examples/calculator/gen/grpc/calculator/pb/goagen_calculator_calculator_grpc.pb.go @@ -1,4 +1,4 @@ -// Code generated with goa v3.22.1, DO NOT EDIT. +// Code generated with goa v3.22.6, DO NOT EDIT. // // calculator protocol buffer definition // @@ -8,7 +8,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v5.29.3 +// - protoc v6.32.1 // source: goagen_calculator_calculator.proto package calculatorpb diff --git a/testing/examples/calculator/gen/grpc/calculator/server/encode_decode.go b/testing/examples/calculator/gen/grpc/calculator/server/encode_decode.go index 91f791aab..b01738b88 100644 --- a/testing/examples/calculator/gen/grpc/calculator/server/encode_decode.go +++ b/testing/examples/calculator/gen/grpc/calculator/server/encode_decode.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // calculator gRPC server encoders and decoders // diff --git a/testing/examples/calculator/gen/grpc/calculator/server/server.go b/testing/examples/calculator/gen/grpc/calculator/server/server.go index 69f8c194e..39a970cbe 100644 --- a/testing/examples/calculator/gen/grpc/calculator/server/server.go +++ b/testing/examples/calculator/gen/grpc/calculator/server/server.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // calculator gRPC server // diff --git a/testing/examples/calculator/gen/grpc/calculator/server/types.go b/testing/examples/calculator/gen/grpc/calculator/server/types.go index baeefe722..0a43805fe 100644 --- a/testing/examples/calculator/gen/grpc/calculator/server/types.go +++ b/testing/examples/calculator/gen/grpc/calculator/server/types.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // calculator gRPC server types // diff --git a/testing/examples/calculator/gen/grpc/cli/calculator/cli.go b/testing/examples/calculator/gen/grpc/cli/calculator/cli.go index 297b262da..8e9ebb685 100644 --- a/testing/examples/calculator/gen/grpc/cli/calculator/cli.go +++ b/testing/examples/calculator/gen/grpc/cli/calculator/cli.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // calculator gRPC client CLI support package // @@ -28,10 +28,7 @@ func UsageCommands() []string { // UsageExamples produces an example of a valid invocation of the CLI tool. func UsageExamples() string { - return os.Args[0] + ` calculator add --message '{ - "a": 0.5324087495102858, - "b": 0.3676887822158714 - }'` + "\n" + + return os.Args[0] + " " + "calculator add --message '{\n \"a\": 0.5324087495102858,\n \"b\": 0.3676887822158714\n }'" + "\n" + "" } @@ -166,83 +163,102 @@ func ParseEndpoint( // calculatorUsage displays the usage of the calculator command and its // subcommands. func calculatorUsage() { - fmt.Fprintf(os.Stderr, `A simple calculator service to demonstrate testing plugin features -Usage: - %[1]s [globalflags] calculator COMMAND [flags] - -COMMAND: - add: Add two numbers - divide: Divide two numbers - factorial: Calculate factorial of a number - statistics: Calculate statistics for a list of numbers - batch-add: Add multiple pairs of numbers using streaming - -Additional help: - %[1]s calculator COMMAND --help -`, os.Args[0]) + fmt.Fprintln(os.Stderr, `A simple calculator service to demonstrate testing plugin features`) + fmt.Fprintf(os.Stderr, "Usage:\n %s [globalflags] calculator COMMAND [flags]\n\n", os.Args[0]) + fmt.Fprintln(os.Stderr, "COMMAND:") + fmt.Fprintln(os.Stderr, ` add: Add two numbers`) + fmt.Fprintln(os.Stderr, ` divide: Divide two numbers`) + fmt.Fprintln(os.Stderr, ` factorial: Calculate factorial of a number`) + fmt.Fprintln(os.Stderr, ` statistics: Calculate statistics for a list of numbers`) + fmt.Fprintln(os.Stderr, ` batch-add: Add multiple pairs of numbers using streaming`) + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Additional help:") + fmt.Fprintf(os.Stderr, " %s calculator COMMAND --help\n", os.Args[0]) } func calculatorAddUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] calculator add -message JSON + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] calculator add", os.Args[0]) + fmt.Fprint(os.Stderr, " -message JSON") + fmt.Fprintln(os.Stderr) -Add two numbers - -message JSON: + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `Add two numbers`) -Example: - %[1]s calculator add --message '{ - "a": 0.5324087495102858, - "b": 0.3676887822158714 - }' -`, os.Args[0]) + // Flags list + fmt.Fprintln(os.Stderr, ` -message JSON: `) + + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "calculator add --message '{\n \"a\": 0.5324087495102858,\n \"b\": 0.3676887822158714\n }'") } func calculatorDivideUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] calculator divide -message JSON + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] calculator divide", os.Args[0]) + fmt.Fprint(os.Stderr, " -message JSON") + fmt.Fprintln(os.Stderr) + + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `Divide two numbers`) -Divide two numbers - -message JSON: + // Flags list + fmt.Fprintln(os.Stderr, ` -message JSON: `) -Example: - %[1]s calculator divide --message '{ - "dividend": 0.09668276034025738, - "divisor": 0.895624710740812 - }' -`, os.Args[0]) + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "calculator divide --message '{\n \"dividend\": 0.09668276034025738,\n \"divisor\": 0.895624710740812\n }'") } func calculatorFactorialUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] calculator factorial -message JSON + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] calculator factorial", os.Args[0]) + fmt.Fprint(os.Stderr, " -message JSON") + fmt.Fprintln(os.Stderr) -Calculate factorial of a number - -message JSON: + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `Calculate factorial of a number`) -Example: - %[1]s calculator factorial --message '{ - "n": 5 - }' -`, os.Args[0]) + // Flags list + fmt.Fprintln(os.Stderr, ` -message JSON: `) + + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "calculator factorial --message '{\n \"n\": 5\n }'") } func calculatorStatisticsUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] calculator statistics -message JSON - -Calculate statistics for a list of numbers - -message JSON: - -Example: - %[1]s calculator statistics --message '{ - "numbers": [ - 0.9092932676423547 - ] - }' -`, os.Args[0]) + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] calculator statistics", os.Args[0]) + fmt.Fprint(os.Stderr, " -message JSON") + fmt.Fprintln(os.Stderr) + + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `Calculate statistics for a list of numbers`) + + // Flags list + fmt.Fprintln(os.Stderr, ` -message JSON: `) + + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "calculator statistics --message '{\n \"numbers\": [\n 0.9092932676423547\n ]\n }'") } func calculatorBatchAddUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] calculator batch-add + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] calculator batch-add", os.Args[0]) + fmt.Fprintln(os.Stderr) + + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `Add multiple pairs of numbers using streaming`) -Add multiple pairs of numbers using streaming + // Flags list -Example: - %[1]s calculator batch-add -`, os.Args[0]) + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "calculator batch-add") } diff --git a/testing/examples/calculator/gen/http/calculator/client/cli.go b/testing/examples/calculator/gen/http/calculator/client/cli.go index 82fc961a3..1b50a1843 100644 --- a/testing/examples/calculator/gen/http/calculator/client/cli.go +++ b/testing/examples/calculator/gen/http/calculator/client/cli.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // calculator HTTP client CLI support package // diff --git a/testing/examples/calculator/gen/http/calculator/client/client.go b/testing/examples/calculator/gen/http/calculator/client/client.go index 58b0873a1..c00161bb9 100644 --- a/testing/examples/calculator/gen/http/calculator/client/client.go +++ b/testing/examples/calculator/gen/http/calculator/client/client.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // calculator client HTTP transport // diff --git a/testing/examples/calculator/gen/http/calculator/client/encode_decode.go b/testing/examples/calculator/gen/http/calculator/client/encode_decode.go index b59200cbb..01a3f5dfe 100644 --- a/testing/examples/calculator/gen/http/calculator/client/encode_decode.go +++ b/testing/examples/calculator/gen/http/calculator/client/encode_decode.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // calculator HTTP client encoders and decoders // diff --git a/testing/examples/calculator/gen/http/calculator/client/paths.go b/testing/examples/calculator/gen/http/calculator/client/paths.go index b94c97aa6..10cc1d4a2 100644 --- a/testing/examples/calculator/gen/http/calculator/client/paths.go +++ b/testing/examples/calculator/gen/http/calculator/client/paths.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // HTTP request path constructors for the calculator service. // diff --git a/testing/examples/calculator/gen/http/calculator/client/types.go b/testing/examples/calculator/gen/http/calculator/client/types.go index c2837f80c..6d1abd616 100644 --- a/testing/examples/calculator/gen/http/calculator/client/types.go +++ b/testing/examples/calculator/gen/http/calculator/client/types.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // calculator HTTP client types // diff --git a/testing/examples/calculator/gen/http/calculator/client/websocket.go b/testing/examples/calculator/gen/http/calculator/client/websocket.go index 1600b2138..1ba0c1ddf 100644 --- a/testing/examples/calculator/gen/http/calculator/client/websocket.go +++ b/testing/examples/calculator/gen/http/calculator/client/websocket.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // calculator WebSocket client streaming // diff --git a/testing/examples/calculator/gen/http/calculator/server/encode_decode.go b/testing/examples/calculator/gen/http/calculator/server/encode_decode.go index 987d63b43..61665e479 100644 --- a/testing/examples/calculator/gen/http/calculator/server/encode_decode.go +++ b/testing/examples/calculator/gen/http/calculator/server/encode_decode.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // calculator HTTP server encoders and decoders // diff --git a/testing/examples/calculator/gen/http/calculator/server/paths.go b/testing/examples/calculator/gen/http/calculator/server/paths.go index da39ae617..e375261c2 100644 --- a/testing/examples/calculator/gen/http/calculator/server/paths.go +++ b/testing/examples/calculator/gen/http/calculator/server/paths.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // HTTP request path constructors for the calculator service. // diff --git a/testing/examples/calculator/gen/http/calculator/server/server.go b/testing/examples/calculator/gen/http/calculator/server/server.go index 51d474603..d20feaca7 100644 --- a/testing/examples/calculator/gen/http/calculator/server/server.go +++ b/testing/examples/calculator/gen/http/calculator/server/server.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // calculator HTTP server // diff --git a/testing/examples/calculator/gen/http/calculator/server/types.go b/testing/examples/calculator/gen/http/calculator/server/types.go index 53706b9cc..824a753eb 100644 --- a/testing/examples/calculator/gen/http/calculator/server/types.go +++ b/testing/examples/calculator/gen/http/calculator/server/types.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // calculator HTTP server types // diff --git a/testing/examples/calculator/gen/http/calculator/server/websocket.go b/testing/examples/calculator/gen/http/calculator/server/websocket.go index 7c1088eab..7b5ae8e29 100644 --- a/testing/examples/calculator/gen/http/calculator/server/websocket.go +++ b/testing/examples/calculator/gen/http/calculator/server/websocket.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // calculator WebSocket server streaming // diff --git a/testing/examples/calculator/gen/http/cli/calculator/cli.go b/testing/examples/calculator/gen/http/cli/calculator/cli.go index e826380c0..cd76882f4 100644 --- a/testing/examples/calculator/gen/http/cli/calculator/cli.go +++ b/testing/examples/calculator/gen/http/cli/calculator/cli.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // calculator HTTP client CLI support package // @@ -29,10 +29,7 @@ func UsageCommands() []string { // UsageExamples produces an example of a valid invocation of the CLI tool. func UsageExamples() string { - return os.Args[0] + ` calculator add --body '{ - "a": 0.48385320048391656, - "b": 0.9771980381809557 - }'` + "\n" + + return os.Args[0] + " " + "calculator add --body '{\n \"a\": 0.48385320048391656,\n \"b\": 0.9771980381809557\n }'" + "\n" + "" } @@ -172,84 +169,102 @@ func ParseEndpoint( // calculatorUsage displays the usage of the calculator command and its // subcommands. func calculatorUsage() { - fmt.Fprintf(os.Stderr, `A simple calculator service to demonstrate testing plugin features -Usage: - %[1]s [globalflags] calculator COMMAND [flags] - -COMMAND: - add: Add two numbers - divide: Divide two numbers - factorial: Calculate factorial of a number - statistics: Calculate statistics for a list of numbers - batch-add: Add multiple pairs of numbers using streaming - -Additional help: - %[1]s calculator COMMAND --help -`, os.Args[0]) + fmt.Fprintln(os.Stderr, `A simple calculator service to demonstrate testing plugin features`) + fmt.Fprintf(os.Stderr, "Usage:\n %s [globalflags] calculator COMMAND [flags]\n\n", os.Args[0]) + fmt.Fprintln(os.Stderr, "COMMAND:") + fmt.Fprintln(os.Stderr, ` add: Add two numbers`) + fmt.Fprintln(os.Stderr, ` divide: Divide two numbers`) + fmt.Fprintln(os.Stderr, ` factorial: Calculate factorial of a number`) + fmt.Fprintln(os.Stderr, ` statistics: Calculate statistics for a list of numbers`) + fmt.Fprintln(os.Stderr, ` batch-add: Add multiple pairs of numbers using streaming`) + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Additional help:") + fmt.Fprintf(os.Stderr, " %s calculator COMMAND --help\n", os.Args[0]) } func calculatorAddUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] calculator add -body JSON + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] calculator add", os.Args[0]) + fmt.Fprint(os.Stderr, " -body JSON") + fmt.Fprintln(os.Stderr) -Add two numbers - -body JSON: + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `Add two numbers`) -Example: - %[1]s calculator add --body '{ - "a": 0.48385320048391656, - "b": 0.9771980381809557 - }' -`, os.Args[0]) + // Flags list + fmt.Fprintln(os.Stderr, ` -body JSON: `) + + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "calculator add --body '{\n \"a\": 0.48385320048391656,\n \"b\": 0.9771980381809557\n }'") } func calculatorDivideUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] calculator divide -body JSON + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] calculator divide", os.Args[0]) + fmt.Fprint(os.Stderr, " -body JSON") + fmt.Fprintln(os.Stderr) + + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `Divide two numbers`) -Divide two numbers - -body JSON: + // Flags list + fmt.Fprintln(os.Stderr, ` -body JSON: `) -Example: - %[1]s calculator divide --body '{ - "dividend": 0.3381157086007379, - "divisor": 0.10085904223482155 - }' -`, os.Args[0]) + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "calculator divide --body '{\n \"dividend\": 0.3381157086007379,\n \"divisor\": 0.10085904223482155\n }'") } func calculatorFactorialUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] calculator factorial -body JSON + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] calculator factorial", os.Args[0]) + fmt.Fprint(os.Stderr, " -body JSON") + fmt.Fprintln(os.Stderr) -Calculate factorial of a number - -body JSON: + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `Calculate factorial of a number`) -Example: - %[1]s calculator factorial --body '{ - "n": 13 - }' -`, os.Args[0]) + // Flags list + fmt.Fprintln(os.Stderr, ` -body JSON: `) + + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "calculator factorial --body '{\n \"n\": 13\n }'") } func calculatorStatisticsUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] calculator statistics -body JSON - -Calculate statistics for a list of numbers - -body JSON: - -Example: - %[1]s calculator statistics --body '{ - "numbers": [ - 0.8678700718070149, - 0.1307058221039593 - ] - }' -`, os.Args[0]) + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] calculator statistics", os.Args[0]) + fmt.Fprint(os.Stderr, " -body JSON") + fmt.Fprintln(os.Stderr) + + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `Calculate statistics for a list of numbers`) + + // Flags list + fmt.Fprintln(os.Stderr, ` -body JSON: `) + + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "calculator statistics --body '{\n \"numbers\": [\n 0.8678700718070149,\n 0.1307058221039593\n ]\n }'") } func calculatorBatchAddUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] calculator batch-add + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] calculator batch-add", os.Args[0]) + fmt.Fprintln(os.Stderr) + + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `Add multiple pairs of numbers using streaming`) -Add multiple pairs of numbers using streaming + // Flags list -Example: - %[1]s calculator batch-add -`, os.Args[0]) + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "calculator batch-add") } diff --git a/testing/examples/calculator/go.mod b/testing/examples/calculator/go.mod index 4b7f86239..2b0040f1d 100644 --- a/testing/examples/calculator/go.mod +++ b/testing/examples/calculator/go.mod @@ -1,40 +1,40 @@ module goa.design/plugins/v3/testing/examples/calculator -go 1.24.0 +go 1.24.4 toolchain go1.24.5 require ( github.com/gorilla/websocket v1.5.3 - goa.design/clue v1.2.2 - goa.design/goa/v3 v3.22.1 + goa.design/clue v1.2.3 + goa.design/goa/v3 v3.22.6 goa.design/plugins/v3 v3.21.5 - google.golang.org/grpc v1.74.2 - google.golang.org/protobuf v1.36.7 + google.golang.org/grpc v1.76.0 + google.golang.org/protobuf v1.36.10 gopkg.in/yaml.v3 v3.0.1 ) require ( - github.com/aws/smithy-go v1.22.5 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/aws/smithy-go v1.23.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect - github.com/go-chi/chi/v5 v5.2.2 // indirect + github.com/go-chi/chi/v5 v5.2.3 // indirect github.com/go-logr/logr v1.4.3 // indirect - github.com/gohugoio/hashstructure v0.5.0 // indirect + github.com/gohugoio/hashstructure v0.6.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/testify v1.10.0 // indirect - go.opentelemetry.io/otel v1.37.0 // indirect - go.opentelemetry.io/otel/trace v1.37.0 // indirect - golang.org/x/mod v0.27.0 // indirect - golang.org/x/net v0.43.0 // indirect - golang.org/x/sync v0.16.0 // indirect - golang.org/x/sys v0.35.0 // indirect - golang.org/x/term v0.34.0 // indirect - golang.org/x/text v0.28.0 // indirect - golang.org/x/tools v0.36.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250811230008-5f3141c8851a // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/stretchr/testify v1.11.1 // indirect + go.opentelemetry.io/otel v1.38.0 // indirect + go.opentelemetry.io/otel/trace v1.38.0 // indirect + golang.org/x/mod v0.29.0 // indirect + golang.org/x/net v0.46.0 // indirect + golang.org/x/sync v0.17.0 // indirect + golang.org/x/sys v0.37.0 // indirect + golang.org/x/term v0.36.0 // indirect + golang.org/x/text v0.30.0 // indirect + golang.org/x/tools v0.38.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20251014184007-4626949a642f // indirect ) replace goa.design/plugins/v3 => ../../.. diff --git a/testing/examples/calculator/go.sum b/testing/examples/calculator/go.sum index f9d5b0adb..bf6bbab81 100644 --- a/testing/examples/calculator/go.sum +++ b/testing/examples/calculator/go.sum @@ -1,19 +1,25 @@ github.com/aws/smithy-go v1.22.5 h1:P9ATCXPMb2mPjYBgueqJNCA5S9UfktsW0tTxi+a7eqw= github.com/aws/smithy-go v1.22.5/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= +github.com/aws/smithy-go v1.23.1/go.mod h1:LEj2LM3rBRQJxPZTB4KuzZkaZYnZPnvgIhb4pu07mx0= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 h1:MGKhKyiYrvMDZsmLR/+RGffQSXwEkXgfLSA08qDn9AI= github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598/go.mod h1:0FpDmbrt36utu8jEmeU05dPC9AB5tsLYVVi+ZHfyuwI= github.com/go-chi/chi/v5 v5.2.2 h1:CMwsvRVTbXVytCk1Wd72Zy1LAsAh9GxMmSNWLHCG618= github.com/go-chi/chi/v5 v5.2.2/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops= +github.com/go-chi/chi/v5 v5.2.3/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/gohugoio/hashstructure v0.5.0 h1:G2fjSBU36RdwEJBWJ+919ERvOVqAg9tfcYp47K9swqg= github.com/gohugoio/hashstructure v0.5.0/go.mod h1:Ser0TniXuu/eauYmrwM4o64EBvySxNzITEOLlm4igec= +github.com/gohugoio/hashstructure v0.6.0 h1:7wMB/2CfXoThFYhdWRGv3u3rUM761Cq29CxUW+NltUg= +github.com/gohugoio/hashstructure v0.6.0/go.mod h1:lapVLk9XidheHG1IQ4ZSbyYrXcaILU1ZEP/+vno5rBQ= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= @@ -28,12 +34,17 @@ github.com/manveru/gobdd v0.0.0-20131210092515-f1a17fdd710b h1:3E44bLeN8uKYdfQqV github.com/manveru/gobdd v0.0.0-20131210092515-f1a17fdd710b/go.mod h1:Bj8LjjP0ReT1eKt5QlKjwgi5AFm5mI6O1A2G4ChI0Ag= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ= go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I= +go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.36.0 h1:G8Xec/SgZQricwWBJF/mHZc7A02YHedfFDENwJEdRA0= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.36.0/go.mod h1:PD57idA/AiFD5aqoxGxCvT/ILJPeHy3MjqU/NS7KogY= go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE= @@ -44,30 +55,48 @@ go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFh go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps= go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= +go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= goa.design/clue v1.2.2 h1:rJDMdKnHyLecKEWvoapQ/1Fe4fcv1X91BrbllsBTtFM= goa.design/clue v1.2.2/go.mod h1:H0q8ayIEcotYUtN9Vi+82knSo1fMtiUz5G2juqPma6M= +goa.design/clue v1.2.3/go.mod h1:7/L931m3SrOfxebASs4/R3QP71K/4JUzUTol8mtk7wQ= goa.design/goa/v3 v3.22.1 h1:v88mN1cmt2oUTxgJEZp5ADpu+DmLeN65laGsnt2f4Cs= goa.design/goa/v3 v3.22.1/go.mod h1:/GjYn5dFGg25XccTC6zu+oCMK4CzClOY2zgPgJ/yYEA= +goa.design/goa/v3 v3.22.6 h1:D2qDkAvdpf6ePr2iXKT+Ple5WDrjyes3iOfYD2yCpw0= +goa.design/goa/v3 v3.22.6/go.mod h1:rhssEXxox3+sKnYp18hPNFCz65I4hLWHEtJKewoNJWk= golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ= golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= +golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA= +golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w= golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= +golang.org/x/net v0.46.0/go.mod h1:Q9BGdFy1y4nkUwiLvT5qtyhAnEHgnQ/zd8PfU6nc210= golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= +golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4= golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw= +golang.org/x/term v0.36.0/go.mod h1:Qu394IJq6V6dCBRgwqshf3mPF85AqzYEzofzRdZkWss= golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= +golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k= +golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM= golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= +golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ= +golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs= google.golang.org/genproto/googleapis/rpc v0.0.0-20250811230008-5f3141c8851a h1:tPE/Kp+x9dMSwUm/uM0JKK0IfdiJkwAbSMSeZBXXJXc= google.golang.org/genproto/googleapis/rpc v0.0.0-20250811230008-5f3141c8851a/go.mod h1:gw1tLEfykwDz2ET4a12jcXt4couGAm7IwsVaTy0Sflo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251014184007-4626949a642f/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= +google.golang.org/grpc v1.76.0/go.mod h1:Ju12QI8M6iQJtbcsV+awF5a4hfJMLi4X0JLo94ULZ6c= google.golang.org/protobuf v1.36.7 h1:IgrO7UwFQGJdRNXH/sQux4R1Dj1WAKcLElzeeRaXV2A= google.golang.org/protobuf v1.36.7/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/testing/examples/calculator/go.work.sum b/testing/examples/calculator/go.work.sum index 42a56be3a..43d1f5b0a 100644 --- a/testing/examples/calculator/go.work.sum +++ b/testing/examples/calculator/go.work.sum @@ -1,6 +1,7 @@ cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= cloud.google.com/go/compute/metadata v0.7.0/go.mod h1:j5MvL9PprKL39t166CoB1uVHfQMs4tFQZZcKwksXUjo= github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0/go.mod h1:yAZHSGnqScoU556rBOVkwLze6WP5N+U11RHuWaGVxwY= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.29.0/go.mod h1:Cz6ft6Dkn3Et6l2v2a9/RpN7epQ1GtDlO6lj8bEcOvw= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= @@ -9,6 +10,7 @@ github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+ github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= +github.com/aws/smithy-go v1.23.0/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= @@ -17,7 +19,6 @@ github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5P github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/envoyproxy/go-control-plane v0.13.4/go.mod h1:kDfuBlDVsSj2MjrLEtRWtHlsWIFcGyB2RMO44Dc5GZA= github.com/envoyproxy/go-control-plane/envoy v1.32.4/go.mod h1:Gzjc5k8JcJswLjAx1Zm+wSYE20UrLtt7JZMWiWQXQEw= @@ -28,6 +29,7 @@ github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/go-jose/go-jose/v4 v4.0.5/go.mod h1:s3P1lRrkT8igV8D9OjyL4WRyHvjB6a4JSllnOrmmBOA= +github.com/go-jose/go-jose/v4 v4.1.2/go.mod h1:22cg9HWM1pOlnRiY+9cQYJ9XHmya1bYW8OeDM6Ku6Oo= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= @@ -39,6 +41,7 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1/go.mod h1:Zanoh4+gvIgluNqcfMVTJueD4wSS5hT7zTt4Mrutd90= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2/go.mod h1:pkJQ2tZHJ0aFOVEEot6oZmaVEZcRme73eIFmhiVuRWs= github.com/hashicorp/consul/api v1.14.0/go.mod h1:bcaw5CSZ7NE9qfOfKCI1xb7ZKjzu/MyvQkCLTfqLqxQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v1.2.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= @@ -92,45 +95,76 @@ go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lL go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/contrib/detectors/gcp v1.36.0/go.mod h1:IbBN8uAIIx734PTonTPxAxnjc2pQTxWNkwfstZ+6H2k= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0/go.mod h1:NfchwuyNoMcZ5MLHwPrODwUF1HWCXWrL31s8gSAdIKY= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0/go.mod h1:h06DGIukJOevXaj/xrNjhi/2098RZzcLTbc0jDAUbsg= go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.37.0/go.mod h1:hOfBCz8kv/wuq73Mx2H2QnWokh/kHZxkh6SNF2bdKtw= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.38.0/go.mod h1:GAXRxmLJcVM3u22IjTg74zWBrRCKq8BnOqUVLodpcpw= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.37.0/go.mod h1:0ineDcLELf6JmKfuo0wvvhAVMuxWFYvkTin2iV4ydPQ= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.38.0/go.mod h1:ZQM5lAJpOsKnYagGg/zV2krVqTtaVdYdDkhMoX6Oalg= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0/go.mod h1:MJTqhM0im3mRLw1i8uGHnCvUEeS7VwRyxlLC78PA18M= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0/go.mod h1:ri3aaHSmCTVYu2AWv44YMauwAQc0aqI9gHKIcSbI1pU= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.37.0/go.mod h1:QjUEoiGCPkvFZ/MjK6ZZfNOS6mfVEVKYE99dFhuN2LI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0/go.mod h1:Kz/oCE7z5wuyhPxsXDuaPteSWqjSBD5YaSdbxZYGbGk= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.37.0/go.mod h1:dDT67G/IkA46Mr2l9Uj7HsQVwsjASyV9SjGofsiUZDA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0/go.mod h1:kldtb7jDTeol0l3ewcmd8SDvx3EmIE7lyvqbasU3QC4= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.36.0/go.mod h1:dowW6UsM9MKbJq5JTz2AMVp3/5iW5I/TStsk8S+CfHw= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.38.0/go.mod h1:ra3Pa40+oKjvYh+ZD3EdxFZZB0xdMfuileHAm4nNN7w= go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= go.opentelemetry.io/proto/otlp v1.7.0/go.mod h1:fSKjH6YJ7HDlwzltzyMj036AJ3ejJLCgCSHGj4efDDo= +go.opentelemetry.io/proto/otlp v1.8.0/go.mod h1:tIeYOeNBU4cvmPqpaji1P+KbB4Oloai8wN4rWzRrFF0= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +goa.design/goa/v3 v3.22.2/go.mod h1:uoL/ToZDMYwpxy1UM946W8bFKz8wCBzXcqs3ZwrsUkw= golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= +golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc= +golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0= golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ= +golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI= golang.org/x/net v0.37.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= +golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY= +golang.org/x/net v0.45.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY= golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/telemetry v0.0.0-20250807160809-1a19826ec488/go.mod h1:fGb/2+tgXXjhjHsTNdVEEMZNWA0quBnfrO+AfoDSAKw= +golang.org/x/telemetry v0.0.0-20251008203120-078029d740a8/go.mod h1:Pi4ztBfryZoJEkyFTI5/Ocsu2jXyDr6iSdgJiYE/uwE= +golang.org/x/term v0.35.0/go.mod h1:TPGtkTLesOwf2DE8CgVYiZinHAOuy5AYUYT1lENIZnA= golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= +golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= +golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4= golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw= +golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto v0.0.0-20250721164621-a45f3dfb1074 h1:OC4JjCnGdf5dQ5lMsq3KOGmd0xFXTeeo4h8QFoiLQhA= google.golang.org/genproto v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:ZIjaIRmV0lzMh6VMUdtRvj3TTfpe0uA3cHt3skrCdSQ= +google.golang.org/genproto v0.0.0-20250908214217-97024824d090 h1:ywCL7vA2n3vVHyf+bx1ZV/knaTPRI8GIeKY0MEhEeOc= +google.golang.org/genproto v0.0.0-20250908214217-97024824d090/go.mod h1:zwJI9HzbJJlw2KXy0wX+lmT2JuZoaKK9JC4ppqmxxjk= google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a/go.mod h1:a77HrdMjoeKbnd2jmgcWdaS++ZLZAEq3orIOAEIKiVw= google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:vYFwMYFbmA8vl6Z/krj/h7+U/AqpHknwJX4Uqgfyc7I= +google.golang.org/genproto/googleapis/api v0.0.0-20250804133106-a7a43d27e69b/go.mod h1:oDOGiMSXHL4sDTJvFvIB9nRQCGdLP1o/iVaqQK8zB+M= +google.golang.org/genproto/googleapis/api v0.0.0-20250908214217-97024824d090/go.mod h1:U8EXRNSd8sUYyDfs/It7KVWodQr+Hf9xtxyxWudSwEw= google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= google.golang.org/genproto/googleapis/rpc v0.0.0-20250715232539-7130f93afb79/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250804133106-a7a43d27e69b/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250826171959-ef028d996bc1/go.mod h1:GmFNa4BdJZ2a8G+wCe9Bg3wwThLrJun751XstdJt5Og= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250908214217-97024824d090/go.mod h1:GmFNa4BdJZ2a8G+wCe9Bg3wwThLrJun751XstdJt5Og= google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/grpc v1.71.0/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec= +google.golang.org/grpc v1.75.1/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= +google.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= diff --git a/testing/examples/httpgrpc/gen/grpc/cli/test_http_grpc/cli.go b/testing/examples/httpgrpc/gen/grpc/cli/test_http_grpc/cli.go index 7d3f75b9c..643f560d4 100644 --- a/testing/examples/httpgrpc/gen/grpc/cli/test_http_grpc/cli.go +++ b/testing/examples/httpgrpc/gen/grpc/cli/test_http_grpc/cli.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-http-grpc gRPC client CLI support package // @@ -28,9 +28,7 @@ func UsageCommands() []string { // UsageExamples produces an example of a valid invocation of the CLI tool. func UsageExamples() string { - return os.Args[0] + ` test-http-grpc grpc-no-stream --message '{ - "msg": "Quod sed animi." - }'` + "\n" + + return os.Args[0] + " " + "test-http-grpc grpc-no-stream --message '{\n \"msg\": \"Quod sed animi.\"\n }'" + "\n" + "" } @@ -197,124 +195,170 @@ func ParseEndpoint( // testHTTPGrpcUsage displays the usage of the test-http-grpc command and its // subcommands. func testHTTPGrpcUsage() { - fmt.Fprintf(os.Stderr, `Testing plugin matrix across HTTP and gRPC transports -Usage: - %[1]s [globalflags] test-http-grpc COMMAND [flags] - -COMMAND: - grpc-no-stream: GrpcNoStream implements grpc_no_stream. - grpc-no-stream-error-div-by-zero: GrpcNoStreamErrorDivByZero implements grpc_no_stream_error_div_by_zero. - grpc-server-stream: GrpcServerStream implements grpc_server_stream. - grpc-client-stream: GrpcClientStream implements grpc_client_stream. - grpc-bidi-stream: GrpcBidiStream implements grpc_bidi_stream. - mixed-no-stream: MixedNoStream implements mixed_no_stream. - mixed-server-stream: MixedServerStream implements mixed_server_stream. - mixed-client-stream-ws-grpc: MixedClientStreamWsGrpc implements mixed_client_stream_ws_grpc. - mixed-bidi-stream-ws-grpc: MixedBidiStreamWsGrpc implements mixed_bidi_stream_ws_grpc. - -Additional help: - %[1]s test-http-grpc COMMAND --help -`, os.Args[0]) + fmt.Fprintln(os.Stderr, `Testing plugin matrix across HTTP and gRPC transports`) + fmt.Fprintf(os.Stderr, "Usage:\n %s [globalflags] test-http-grpc COMMAND [flags]\n\n", os.Args[0]) + fmt.Fprintln(os.Stderr, "COMMAND:") + fmt.Fprintln(os.Stderr, ` grpc-no-stream: GrpcNoStream implements grpc_no_stream.`) + fmt.Fprintln(os.Stderr, ` grpc-no-stream-error-div-by-zero: GrpcNoStreamErrorDivByZero implements grpc_no_stream_error_div_by_zero.`) + fmt.Fprintln(os.Stderr, ` grpc-server-stream: GrpcServerStream implements grpc_server_stream.`) + fmt.Fprintln(os.Stderr, ` grpc-client-stream: GrpcClientStream implements grpc_client_stream.`) + fmt.Fprintln(os.Stderr, ` grpc-bidi-stream: GrpcBidiStream implements grpc_bidi_stream.`) + fmt.Fprintln(os.Stderr, ` mixed-no-stream: MixedNoStream implements mixed_no_stream.`) + fmt.Fprintln(os.Stderr, ` mixed-server-stream: MixedServerStream implements mixed_server_stream.`) + fmt.Fprintln(os.Stderr, ` mixed-client-stream-ws-grpc: MixedClientStreamWsGrpc implements mixed_client_stream_ws_grpc.`) + fmt.Fprintln(os.Stderr, ` mixed-bidi-stream-ws-grpc: MixedBidiStreamWsGrpc implements mixed_bidi_stream_ws_grpc.`) + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Additional help:") + fmt.Fprintf(os.Stderr, " %s test-http-grpc COMMAND --help\n", os.Args[0]) } func testHTTPGrpcGrpcNoStreamUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] test-http-grpc grpc-no-stream -message JSON + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] test-http-grpc grpc-no-stream", os.Args[0]) + fmt.Fprint(os.Stderr, " -message JSON") + fmt.Fprintln(os.Stderr) -GrpcNoStream implements grpc_no_stream. - -message JSON: + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `GrpcNoStream implements grpc_no_stream.`) -Example: - %[1]s test-http-grpc grpc-no-stream --message '{ - "msg": "Quod sed animi." - }' -`, os.Args[0]) + // Flags list + fmt.Fprintln(os.Stderr, ` -message JSON: `) + + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "test-http-grpc grpc-no-stream --message '{\n \"msg\": \"Quod sed animi.\"\n }'") } func testHTTPGrpcGrpcNoStreamErrorDivByZeroUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] test-http-grpc grpc-no-stream-error-div-by-zero -message JSON + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] test-http-grpc grpc-no-stream-error-div-by-zero", os.Args[0]) + fmt.Fprint(os.Stderr, " -message JSON") + fmt.Fprintln(os.Stderr) + + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `GrpcNoStreamErrorDivByZero implements grpc_no_stream_error_div_by_zero.`) -GrpcNoStreamErrorDivByZero implements grpc_no_stream_error_div_by_zero. - -message JSON: + // Flags list + fmt.Fprintln(os.Stderr, ` -message JSON: `) -Example: - %[1]s test-http-grpc grpc-no-stream-error-div-by-zero --message '{ - "dividend": 945.4174285671912, - "divisor": 86.42502765745502 - }' -`, os.Args[0]) + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "test-http-grpc grpc-no-stream-error-div-by-zero --message '{\n \"dividend\": 945.4174285671912,\n \"divisor\": 86.42502765745502\n }'") } func testHTTPGrpcGrpcServerStreamUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] test-http-grpc grpc-server-stream -message JSON + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] test-http-grpc grpc-server-stream", os.Args[0]) + fmt.Fprint(os.Stderr, " -message JSON") + fmt.Fprintln(os.Stderr) + + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `GrpcServerStream implements grpc_server_stream.`) -GrpcServerStream implements grpc_server_stream. - -message JSON: + // Flags list + fmt.Fprintln(os.Stderr, ` -message JSON: `) -Example: - %[1]s test-http-grpc grpc-server-stream --message '{ - "from": 3838295199258435316 - }' -`, os.Args[0]) + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "test-http-grpc grpc-server-stream --message '{\n \"from\": 3838295199258435316\n }'") } func testHTTPGrpcGrpcClientStreamUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] test-http-grpc grpc-client-stream + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] test-http-grpc grpc-client-stream", os.Args[0]) + fmt.Fprintln(os.Stderr) -GrpcClientStream implements grpc_client_stream. + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `GrpcClientStream implements grpc_client_stream.`) -Example: - %[1]s test-http-grpc grpc-client-stream -`, os.Args[0]) + // Flags list + + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "test-http-grpc grpc-client-stream") } func testHTTPGrpcGrpcBidiStreamUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] test-http-grpc grpc-bidi-stream + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] test-http-grpc grpc-bidi-stream", os.Args[0]) + fmt.Fprintln(os.Stderr) + + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `GrpcBidiStream implements grpc_bidi_stream.`) -GrpcBidiStream implements grpc_bidi_stream. + // Flags list -Example: - %[1]s test-http-grpc grpc-bidi-stream -`, os.Args[0]) + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "test-http-grpc grpc-bidi-stream") } func testHTTPGrpcMixedNoStreamUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] test-http-grpc mixed-no-stream -message JSON + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] test-http-grpc mixed-no-stream", os.Args[0]) + fmt.Fprint(os.Stderr, " -message JSON") + fmt.Fprintln(os.Stderr) -MixedNoStream implements mixed_no_stream. - -message JSON: + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `MixedNoStream implements mixed_no_stream.`) -Example: - %[1]s test-http-grpc mixed-no-stream --message '{ - "msg": "Laboriosam aliquam ab." - }' -`, os.Args[0]) + // Flags list + fmt.Fprintln(os.Stderr, ` -message JSON: `) + + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "test-http-grpc mixed-no-stream --message '{\n \"msg\": \"Laboriosam aliquam ab.\"\n }'") } func testHTTPGrpcMixedServerStreamUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] test-http-grpc mixed-server-stream + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] test-http-grpc mixed-server-stream", os.Args[0]) + fmt.Fprintln(os.Stderr) + + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `MixedServerStream implements mixed_server_stream.`) -MixedServerStream implements mixed_server_stream. + // Flags list -Example: - %[1]s test-http-grpc mixed-server-stream -`, os.Args[0]) + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "test-http-grpc mixed-server-stream") } func testHTTPGrpcMixedClientStreamWsGrpcUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] test-http-grpc mixed-client-stream-ws-grpc + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] test-http-grpc mixed-client-stream-ws-grpc", os.Args[0]) + fmt.Fprintln(os.Stderr) -MixedClientStreamWsGrpc implements mixed_client_stream_ws_grpc. + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `MixedClientStreamWsGrpc implements mixed_client_stream_ws_grpc.`) -Example: - %[1]s test-http-grpc mixed-client-stream-ws-grpc -`, os.Args[0]) + // Flags list + + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "test-http-grpc mixed-client-stream-ws-grpc") } func testHTTPGrpcMixedBidiStreamWsGrpcUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] test-http-grpc mixed-bidi-stream-ws-grpc + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] test-http-grpc mixed-bidi-stream-ws-grpc", os.Args[0]) + fmt.Fprintln(os.Stderr) + + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `MixedBidiStreamWsGrpc implements mixed_bidi_stream_ws_grpc.`) -MixedBidiStreamWsGrpc implements mixed_bidi_stream_ws_grpc. + // Flags list -Example: - %[1]s test-http-grpc mixed-bidi-stream-ws-grpc -`, os.Args[0]) + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "test-http-grpc mixed-bidi-stream-ws-grpc") } diff --git a/testing/examples/httpgrpc/gen/grpc/test_http_grpc/client/cli.go b/testing/examples/httpgrpc/gen/grpc/test_http_grpc/client/cli.go index 7f47fbff7..2f1f6396a 100644 --- a/testing/examples/httpgrpc/gen/grpc/test_http_grpc/client/cli.go +++ b/testing/examples/httpgrpc/gen/grpc/test_http_grpc/client/cli.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-http-grpc gRPC client CLI support package // diff --git a/testing/examples/httpgrpc/gen/grpc/test_http_grpc/client/client.go b/testing/examples/httpgrpc/gen/grpc/test_http_grpc/client/client.go index 114027216..4ba9ec265 100644 --- a/testing/examples/httpgrpc/gen/grpc/test_http_grpc/client/client.go +++ b/testing/examples/httpgrpc/gen/grpc/test_http_grpc/client/client.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-http-grpc gRPC client // @@ -79,6 +79,11 @@ func (c *Client) GrpcNoStream() goa.Endpoint { DecodeGrpcNoStreamResponse) res, err := inv.Invoke(ctx, v) if err != nil { + // Try to decode a Goa error response detail before falling back to Fault. + resp := goagrpc.DecodeError(err) + if eresp, ok := resp.(*goapb.ErrorResponse); ok { + return nil, goagrpc.NewServiceError(eresp) + } return nil, goa.Fault("%s", err.Error()) } return res, nil @@ -119,6 +124,11 @@ func (c *Client) GrpcServerStream() goa.Endpoint { DecodeGrpcServerStreamResponse) res, err := inv.Invoke(ctx, v) if err != nil { + // Try to decode a Goa error response detail before falling back to Fault. + resp := goagrpc.DecodeError(err) + if eresp, ok := resp.(*goapb.ErrorResponse); ok { + return nil, goagrpc.NewServiceError(eresp) + } return nil, goa.Fault("%s", err.Error()) } return res, nil @@ -135,6 +145,11 @@ func (c *Client) GrpcClientStream() goa.Endpoint { DecodeGrpcClientStreamResponse) res, err := inv.Invoke(ctx, v) if err != nil { + // Try to decode a Goa error response detail before falling back to Fault. + resp := goagrpc.DecodeError(err) + if eresp, ok := resp.(*goapb.ErrorResponse); ok { + return nil, goagrpc.NewServiceError(eresp) + } return nil, goa.Fault("%s", err.Error()) } return res, nil @@ -151,6 +166,11 @@ func (c *Client) GrpcBidiStream() goa.Endpoint { DecodeGrpcBidiStreamResponse) res, err := inv.Invoke(ctx, v) if err != nil { + // Try to decode a Goa error response detail before falling back to Fault. + resp := goagrpc.DecodeError(err) + if eresp, ok := resp.(*goapb.ErrorResponse); ok { + return nil, goagrpc.NewServiceError(eresp) + } return nil, goa.Fault("%s", err.Error()) } return res, nil @@ -167,6 +187,11 @@ func (c *Client) MixedNoStream() goa.Endpoint { DecodeMixedNoStreamResponse) res, err := inv.Invoke(ctx, v) if err != nil { + // Try to decode a Goa error response detail before falling back to Fault. + resp := goagrpc.DecodeError(err) + if eresp, ok := resp.(*goapb.ErrorResponse); ok { + return nil, goagrpc.NewServiceError(eresp) + } return nil, goa.Fault("%s", err.Error()) } return res, nil @@ -183,6 +208,11 @@ func (c *Client) MixedServerStream() goa.Endpoint { DecodeMixedServerStreamResponse) res, err := inv.Invoke(ctx, v) if err != nil { + // Try to decode a Goa error response detail before falling back to Fault. + resp := goagrpc.DecodeError(err) + if eresp, ok := resp.(*goapb.ErrorResponse); ok { + return nil, goagrpc.NewServiceError(eresp) + } return nil, goa.Fault("%s", err.Error()) } return res, nil @@ -199,6 +229,11 @@ func (c *Client) MixedClientStreamWsGrpc() goa.Endpoint { DecodeMixedClientStreamWsGrpcResponse) res, err := inv.Invoke(ctx, v) if err != nil { + // Try to decode a Goa error response detail before falling back to Fault. + resp := goagrpc.DecodeError(err) + if eresp, ok := resp.(*goapb.ErrorResponse); ok { + return nil, goagrpc.NewServiceError(eresp) + } return nil, goa.Fault("%s", err.Error()) } return res, nil @@ -215,6 +250,11 @@ func (c *Client) MixedBidiStreamWsGrpc() goa.Endpoint { DecodeMixedBidiStreamWsGrpcResponse) res, err := inv.Invoke(ctx, v) if err != nil { + // Try to decode a Goa error response detail before falling back to Fault. + resp := goagrpc.DecodeError(err) + if eresp, ok := resp.(*goapb.ErrorResponse); ok { + return nil, goagrpc.NewServiceError(eresp) + } return nil, goa.Fault("%s", err.Error()) } return res, nil diff --git a/testing/examples/httpgrpc/gen/grpc/test_http_grpc/client/encode_decode.go b/testing/examples/httpgrpc/gen/grpc/test_http_grpc/client/encode_decode.go index bb6665a4b..db72497be 100644 --- a/testing/examples/httpgrpc/gen/grpc/test_http_grpc/client/encode_decode.go +++ b/testing/examples/httpgrpc/gen/grpc/test_http_grpc/client/encode_decode.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-http-grpc gRPC client encoders and decoders // diff --git a/testing/examples/httpgrpc/gen/grpc/test_http_grpc/client/types.go b/testing/examples/httpgrpc/gen/grpc/test_http_grpc/client/types.go index 3ff4d81c1..bea6f7099 100644 --- a/testing/examples/httpgrpc/gen/grpc/test_http_grpc/client/types.go +++ b/testing/examples/httpgrpc/gen/grpc/test_http_grpc/client/types.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-http-grpc gRPC client types // diff --git a/testing/examples/httpgrpc/gen/grpc/test_http_grpc/pb/goagen_httpgrpc_test_http_grpc.pb.go b/testing/examples/httpgrpc/gen/grpc/test_http_grpc/pb/goagen_httpgrpc_test_http_grpc.pb.go index cfb93fd93..5a0561780 100644 --- a/testing/examples/httpgrpc/gen/grpc/test_http_grpc/pb/goagen_httpgrpc_test_http_grpc.pb.go +++ b/testing/examples/httpgrpc/gen/grpc/test_http_grpc/pb/goagen_httpgrpc_test_http_grpc.pb.go @@ -1,4 +1,4 @@ -// Code generated with goa v3.22.1, DO NOT EDIT. +// Code generated with goa v3.22.6, DO NOT EDIT. // // test-http-grpc protocol buffer definition // @@ -7,8 +7,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc v5.29.3 +// protoc-gen-go v1.36.9 +// protoc v6.32.1 // source: goagen_httpgrpc_test_http_grpc.proto package test_http_grpcpb diff --git a/testing/examples/httpgrpc/gen/grpc/test_http_grpc/pb/goagen_httpgrpc_test_http_grpc.proto b/testing/examples/httpgrpc/gen/grpc/test_http_grpc/pb/goagen_httpgrpc_test_http_grpc.proto index 29dd5a2c7..853993d06 100644 --- a/testing/examples/httpgrpc/gen/grpc/test_http_grpc/pb/goagen_httpgrpc_test_http_grpc.proto +++ b/testing/examples/httpgrpc/gen/grpc/test_http_grpc/pb/goagen_httpgrpc_test_http_grpc.proto @@ -1,4 +1,4 @@ -// Code generated with goa v3.22.1, DO NOT EDIT. +// Code generated with goa v3.22.6, DO NOT EDIT. // // test-http-grpc protocol buffer definition // diff --git a/testing/examples/httpgrpc/gen/grpc/test_http_grpc/pb/goagen_httpgrpc_test_http_grpc_grpc.pb.go b/testing/examples/httpgrpc/gen/grpc/test_http_grpc/pb/goagen_httpgrpc_test_http_grpc_grpc.pb.go index af74d00e1..df2ca4787 100644 --- a/testing/examples/httpgrpc/gen/grpc/test_http_grpc/pb/goagen_httpgrpc_test_http_grpc_grpc.pb.go +++ b/testing/examples/httpgrpc/gen/grpc/test_http_grpc/pb/goagen_httpgrpc_test_http_grpc_grpc.pb.go @@ -1,4 +1,4 @@ -// Code generated with goa v3.22.1, DO NOT EDIT. +// Code generated with goa v3.22.6, DO NOT EDIT. // // test-http-grpc protocol buffer definition // @@ -8,7 +8,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v5.29.3 +// - protoc v6.32.1 // source: goagen_httpgrpc_test_http_grpc.proto package test_http_grpcpb diff --git a/testing/examples/httpgrpc/gen/grpc/test_http_grpc/server/encode_decode.go b/testing/examples/httpgrpc/gen/grpc/test_http_grpc/server/encode_decode.go index 6734cf1cb..3f33b21c5 100644 --- a/testing/examples/httpgrpc/gen/grpc/test_http_grpc/server/encode_decode.go +++ b/testing/examples/httpgrpc/gen/grpc/test_http_grpc/server/encode_decode.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-http-grpc gRPC server encoders and decoders // diff --git a/testing/examples/httpgrpc/gen/grpc/test_http_grpc/server/server.go b/testing/examples/httpgrpc/gen/grpc/test_http_grpc/server/server.go index 8ec636aeb..00d5b3ce4 100644 --- a/testing/examples/httpgrpc/gen/grpc/test_http_grpc/server/server.go +++ b/testing/examples/httpgrpc/gen/grpc/test_http_grpc/server/server.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-http-grpc gRPC server // diff --git a/testing/examples/httpgrpc/gen/grpc/test_http_grpc/server/types.go b/testing/examples/httpgrpc/gen/grpc/test_http_grpc/server/types.go index 13a39e5b3..7c3925a9b 100644 --- a/testing/examples/httpgrpc/gen/grpc/test_http_grpc/server/types.go +++ b/testing/examples/httpgrpc/gen/grpc/test_http_grpc/server/types.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-http-grpc gRPC server types // diff --git a/testing/examples/httpgrpc/gen/http/cli/test_http_grpc/cli.go b/testing/examples/httpgrpc/gen/http/cli/test_http_grpc/cli.go index c7617f186..88f1bc4d7 100644 --- a/testing/examples/httpgrpc/gen/http/cli/test_http_grpc/cli.go +++ b/testing/examples/httpgrpc/gen/http/cli/test_http_grpc/cli.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-http-grpc HTTP client CLI support package // @@ -29,9 +29,7 @@ func UsageCommands() []string { // UsageExamples produces an example of a valid invocation of the CLI tool. func UsageExamples() string { - return os.Args[0] + ` test-http-grpc http-no-stream --body '{ - "msg": "Fuga et qui fuga animi." - }'` + "\n" + + return os.Args[0] + " " + "test-http-grpc http-no-stream --body '{\n \"msg\": \"Fuga et qui fuga animi.\"\n }'" + "\n" + "" } @@ -209,131 +207,185 @@ func ParseEndpoint( // testHTTPGrpcUsage displays the usage of the test-http-grpc command and its // subcommands. func testHTTPGrpcUsage() { - fmt.Fprintf(os.Stderr, `Testing plugin matrix across HTTP and gRPC transports -Usage: - %[1]s [globalflags] test-http-grpc COMMAND [flags] - -COMMAND: - http-no-stream: HTTPNoStream implements http_no_stream. - http-no-stream-error: HTTPNoStreamError implements http_no_stream_error. - http-server-stream-sse: HTTPServerStreamSse implements http_server_stream_sse. - http-server-stream-ws: HTTPServerStreamWs implements http_server_stream_ws. - http-client-stream-ws: HTTPClientStreamWs implements http_client_stream_ws. - http-bidi-stream-ws: HTTPBidiStreamWs implements http_bidi_stream_ws. - mixed-no-stream: MixedNoStream implements mixed_no_stream. - mixed-server-stream: MixedServerStream implements mixed_server_stream. - mixed-client-stream-ws-grpc: MixedClientStreamWsGrpc implements mixed_client_stream_ws_grpc. - mixed-bidi-stream-ws-grpc: MixedBidiStreamWsGrpc implements mixed_bidi_stream_ws_grpc. - -Additional help: - %[1]s test-http-grpc COMMAND --help -`, os.Args[0]) + fmt.Fprintln(os.Stderr, `Testing plugin matrix across HTTP and gRPC transports`) + fmt.Fprintf(os.Stderr, "Usage:\n %s [globalflags] test-http-grpc COMMAND [flags]\n\n", os.Args[0]) + fmt.Fprintln(os.Stderr, "COMMAND:") + fmt.Fprintln(os.Stderr, ` http-no-stream: HTTPNoStream implements http_no_stream.`) + fmt.Fprintln(os.Stderr, ` http-no-stream-error: HTTPNoStreamError implements http_no_stream_error.`) + fmt.Fprintln(os.Stderr, ` http-server-stream-sse: HTTPServerStreamSse implements http_server_stream_sse.`) + fmt.Fprintln(os.Stderr, ` http-server-stream-ws: HTTPServerStreamWs implements http_server_stream_ws.`) + fmt.Fprintln(os.Stderr, ` http-client-stream-ws: HTTPClientStreamWs implements http_client_stream_ws.`) + fmt.Fprintln(os.Stderr, ` http-bidi-stream-ws: HTTPBidiStreamWs implements http_bidi_stream_ws.`) + fmt.Fprintln(os.Stderr, ` mixed-no-stream: MixedNoStream implements mixed_no_stream.`) + fmt.Fprintln(os.Stderr, ` mixed-server-stream: MixedServerStream implements mixed_server_stream.`) + fmt.Fprintln(os.Stderr, ` mixed-client-stream-ws-grpc: MixedClientStreamWsGrpc implements mixed_client_stream_ws_grpc.`) + fmt.Fprintln(os.Stderr, ` mixed-bidi-stream-ws-grpc: MixedBidiStreamWsGrpc implements mixed_bidi_stream_ws_grpc.`) + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Additional help:") + fmt.Fprintf(os.Stderr, " %s test-http-grpc COMMAND --help\n", os.Args[0]) } func testHTTPGrpcHTTPNoStreamUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] test-http-grpc http-no-stream -body JSON + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] test-http-grpc http-no-stream", os.Args[0]) + fmt.Fprint(os.Stderr, " -body JSON") + fmt.Fprintln(os.Stderr) -HTTPNoStream implements http_no_stream. - -body JSON: + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `HTTPNoStream implements http_no_stream.`) -Example: - %[1]s test-http-grpc http-no-stream --body '{ - "msg": "Fuga et qui fuga animi." - }' -`, os.Args[0]) + // Flags list + fmt.Fprintln(os.Stderr, ` -body JSON: `) + + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "test-http-grpc http-no-stream --body '{\n \"msg\": \"Fuga et qui fuga animi.\"\n }'") } func testHTTPGrpcHTTPNoStreamErrorUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] test-http-grpc http-no-stream-error -body JSON + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] test-http-grpc http-no-stream-error", os.Args[0]) + fmt.Fprint(os.Stderr, " -body JSON") + fmt.Fprintln(os.Stderr) + + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `HTTPNoStreamError implements http_no_stream_error.`) -HTTPNoStreamError implements http_no_stream_error. - -body JSON: + // Flags list + fmt.Fprintln(os.Stderr, ` -body JSON: `) -Example: - %[1]s test-http-grpc http-no-stream-error --body '{ - "msg": "Et rerum." - }' -`, os.Args[0]) + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "test-http-grpc http-no-stream-error --body '{\n \"msg\": \"Et rerum.\"\n }'") } func testHTTPGrpcHTTPServerStreamSseUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] test-http-grpc http-server-stream-sse + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] test-http-grpc http-server-stream-sse", os.Args[0]) + fmt.Fprintln(os.Stderr) + + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `HTTPServerStreamSse implements http_server_stream_sse.`) -HTTPServerStreamSse implements http_server_stream_sse. + // Flags list -Example: - %[1]s test-http-grpc http-server-stream-sse -`, os.Args[0]) + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "test-http-grpc http-server-stream-sse") } func testHTTPGrpcHTTPServerStreamWsUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] test-http-grpc http-server-stream-ws + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] test-http-grpc http-server-stream-ws", os.Args[0]) + fmt.Fprintln(os.Stderr) -HTTPServerStreamWs implements http_server_stream_ws. + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `HTTPServerStreamWs implements http_server_stream_ws.`) -Example: - %[1]s test-http-grpc http-server-stream-ws -`, os.Args[0]) + // Flags list + + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "test-http-grpc http-server-stream-ws") } func testHTTPGrpcHTTPClientStreamWsUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] test-http-grpc http-client-stream-ws + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] test-http-grpc http-client-stream-ws", os.Args[0]) + fmt.Fprintln(os.Stderr) + + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `HTTPClientStreamWs implements http_client_stream_ws.`) -HTTPClientStreamWs implements http_client_stream_ws. + // Flags list -Example: - %[1]s test-http-grpc http-client-stream-ws -`, os.Args[0]) + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "test-http-grpc http-client-stream-ws") } func testHTTPGrpcHTTPBidiStreamWsUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] test-http-grpc http-bidi-stream-ws + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] test-http-grpc http-bidi-stream-ws", os.Args[0]) + fmt.Fprintln(os.Stderr) -HTTPBidiStreamWs implements http_bidi_stream_ws. + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `HTTPBidiStreamWs implements http_bidi_stream_ws.`) -Example: - %[1]s test-http-grpc http-bidi-stream-ws -`, os.Args[0]) + // Flags list + + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "test-http-grpc http-bidi-stream-ws") } func testHTTPGrpcMixedNoStreamUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] test-http-grpc mixed-no-stream -body JSON + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] test-http-grpc mixed-no-stream", os.Args[0]) + fmt.Fprint(os.Stderr, " -body JSON") + fmt.Fprintln(os.Stderr) + + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `MixedNoStream implements mixed_no_stream.`) -MixedNoStream implements mixed_no_stream. - -body JSON: + // Flags list + fmt.Fprintln(os.Stderr, ` -body JSON: `) -Example: - %[1]s test-http-grpc mixed-no-stream --body '{ - "msg": "Aut autem illo quas ipsum repellat." - }' -`, os.Args[0]) + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "test-http-grpc mixed-no-stream --body '{\n \"msg\": \"Aut autem illo quas ipsum repellat.\"\n }'") } func testHTTPGrpcMixedServerStreamUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] test-http-grpc mixed-server-stream + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] test-http-grpc mixed-server-stream", os.Args[0]) + fmt.Fprintln(os.Stderr) + + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `MixedServerStream implements mixed_server_stream.`) -MixedServerStream implements mixed_server_stream. + // Flags list -Example: - %[1]s test-http-grpc mixed-server-stream -`, os.Args[0]) + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "test-http-grpc mixed-server-stream") } func testHTTPGrpcMixedClientStreamWsGrpcUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] test-http-grpc mixed-client-stream-ws-grpc + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] test-http-grpc mixed-client-stream-ws-grpc", os.Args[0]) + fmt.Fprintln(os.Stderr) -MixedClientStreamWsGrpc implements mixed_client_stream_ws_grpc. + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `MixedClientStreamWsGrpc implements mixed_client_stream_ws_grpc.`) -Example: - %[1]s test-http-grpc mixed-client-stream-ws-grpc -`, os.Args[0]) + // Flags list + + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "test-http-grpc mixed-client-stream-ws-grpc") } func testHTTPGrpcMixedBidiStreamWsGrpcUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] test-http-grpc mixed-bidi-stream-ws-grpc + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] test-http-grpc mixed-bidi-stream-ws-grpc", os.Args[0]) + fmt.Fprintln(os.Stderr) + + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `MixedBidiStreamWsGrpc implements mixed_bidi_stream_ws_grpc.`) -MixedBidiStreamWsGrpc implements mixed_bidi_stream_ws_grpc. + // Flags list -Example: - %[1]s test-http-grpc mixed-bidi-stream-ws-grpc -`, os.Args[0]) + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "test-http-grpc mixed-bidi-stream-ws-grpc") } diff --git a/testing/examples/httpgrpc/gen/http/test_http_grpc/client/cli.go b/testing/examples/httpgrpc/gen/http/test_http_grpc/client/cli.go index 5313a04d4..cfa0ac309 100644 --- a/testing/examples/httpgrpc/gen/http/test_http_grpc/client/cli.go +++ b/testing/examples/httpgrpc/gen/http/test_http_grpc/client/cli.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-http-grpc HTTP client CLI support package // diff --git a/testing/examples/httpgrpc/gen/http/test_http_grpc/client/client.go b/testing/examples/httpgrpc/gen/http/test_http_grpc/client/client.go index f52ba019a..7960732be 100644 --- a/testing/examples/httpgrpc/gen/http/test_http_grpc/client/client.go +++ b/testing/examples/httpgrpc/gen/http/test_http_grpc/client/client.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-http-grpc client HTTP transport // diff --git a/testing/examples/httpgrpc/gen/http/test_http_grpc/client/encode_decode.go b/testing/examples/httpgrpc/gen/http/test_http_grpc/client/encode_decode.go index 99054cbea..681110d06 100644 --- a/testing/examples/httpgrpc/gen/http/test_http_grpc/client/encode_decode.go +++ b/testing/examples/httpgrpc/gen/http/test_http_grpc/client/encode_decode.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-http-grpc HTTP client encoders and decoders // diff --git a/testing/examples/httpgrpc/gen/http/test_http_grpc/client/paths.go b/testing/examples/httpgrpc/gen/http/test_http_grpc/client/paths.go index 66e20cc69..1441201bb 100644 --- a/testing/examples/httpgrpc/gen/http/test_http_grpc/client/paths.go +++ b/testing/examples/httpgrpc/gen/http/test_http_grpc/client/paths.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // HTTP request path constructors for the test-http-grpc service. // diff --git a/testing/examples/httpgrpc/gen/http/test_http_grpc/client/sse.go b/testing/examples/httpgrpc/gen/http/test_http_grpc/client/sse.go index 73a35dae8..1f32db9cd 100644 --- a/testing/examples/httpgrpc/gen/http/test_http_grpc/client/sse.go +++ b/testing/examples/httpgrpc/gen/http/test_http_grpc/client/sse.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // sse-client // @@ -217,13 +217,12 @@ func (s *HTTPServerStreamSseStreamImpl) processEvent(eventData []byte) (event *t } if len(dataLines) > 0 { dataContent := strings.Join(dataLines, "\n") - - // Use user-provided decoder for complex types + // Decode JSON into the struct pointer directly respBody := &http.Response{ StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader([]byte(dataContent))), } - err = s.decoder(respBody).Decode(&event) + err = s.decoder(respBody).Decode(event) if err != nil { return } @@ -440,13 +439,12 @@ func (s *MixedServerStreamStreamImpl) processEvent(eventData []byte) (event *tes } if len(dataLines) > 0 { dataContent := strings.Join(dataLines, "\n") - - // Use user-provided decoder for complex types + // Decode JSON into the struct pointer directly respBody := &http.Response{ StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader([]byte(dataContent))), } - err = s.decoder(respBody).Decode(&event) + err = s.decoder(respBody).Decode(event) if err != nil { return } diff --git a/testing/examples/httpgrpc/gen/http/test_http_grpc/client/types.go b/testing/examples/httpgrpc/gen/http/test_http_grpc/client/types.go index 0faa638af..61c89d581 100644 --- a/testing/examples/httpgrpc/gen/http/test_http_grpc/client/types.go +++ b/testing/examples/httpgrpc/gen/http/test_http_grpc/client/types.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-http-grpc HTTP client types // diff --git a/testing/examples/httpgrpc/gen/http/test_http_grpc/client/websocket.go b/testing/examples/httpgrpc/gen/http/test_http_grpc/client/websocket.go index c692a4e5e..7c1572686 100644 --- a/testing/examples/httpgrpc/gen/http/test_http_grpc/client/websocket.go +++ b/testing/examples/httpgrpc/gen/http/test_http_grpc/client/websocket.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-http-grpc WebSocket client streaming // diff --git a/testing/examples/httpgrpc/gen/http/test_http_grpc/server/encode_decode.go b/testing/examples/httpgrpc/gen/http/test_http_grpc/server/encode_decode.go index 902b4df95..d5ce23ba2 100644 --- a/testing/examples/httpgrpc/gen/http/test_http_grpc/server/encode_decode.go +++ b/testing/examples/httpgrpc/gen/http/test_http_grpc/server/encode_decode.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-http-grpc HTTP server encoders and decoders // diff --git a/testing/examples/httpgrpc/gen/http/test_http_grpc/server/paths.go b/testing/examples/httpgrpc/gen/http/test_http_grpc/server/paths.go index 74cf6665c..202e35602 100644 --- a/testing/examples/httpgrpc/gen/http/test_http_grpc/server/paths.go +++ b/testing/examples/httpgrpc/gen/http/test_http_grpc/server/paths.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // HTTP request path constructors for the test-http-grpc service. // diff --git a/testing/examples/httpgrpc/gen/http/test_http_grpc/server/server.go b/testing/examples/httpgrpc/gen/http/test_http_grpc/server/server.go index 9dc1587d9..94eaae201 100644 --- a/testing/examples/httpgrpc/gen/http/test_http_grpc/server/server.go +++ b/testing/examples/httpgrpc/gen/http/test_http_grpc/server/server.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-http-grpc HTTP server // diff --git a/testing/examples/httpgrpc/gen/http/test_http_grpc/server/sse.go b/testing/examples/httpgrpc/gen/http/test_http_grpc/server/sse.go index 003ab1890..966b5970d 100644 --- a/testing/examples/httpgrpc/gen/http/test_http_grpc/server/sse.go +++ b/testing/examples/httpgrpc/gen/http/test_http_grpc/server/sse.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // sse // @@ -55,11 +55,53 @@ func (s *HTTPServerStreamSseServerStream) SendWithContext(ctx context.Context, v res := v var data string - byts, err := json.Marshal(res) - if err != nil { - return err + var payload any + body := NewHTTPServerStreamSseResponseBody(res) + payload = body + switch v := payload.(type) { + case nil: + data = "null" + case string: + data = v + case []byte: + data = string(v) + case bool: + if v { + data = "true" + } else { + data = "false" + } + case int: + data = fmt.Sprintf("%d", v) + case int8: + data = fmt.Sprintf("%d", v) + case int16: + data = fmt.Sprintf("%d", v) + case int32: + data = fmt.Sprintf("%d", v) + case int64: + data = fmt.Sprintf("%d", v) + case uint: + data = fmt.Sprintf("%d", v) + case uint8: + data = fmt.Sprintf("%d", v) + case uint16: + data = fmt.Sprintf("%d", v) + case uint32: + data = fmt.Sprintf("%d", v) + case uint64: + data = fmt.Sprintf("%d", v) + case float32: + data = fmt.Sprintf("%g", v) + case float64: + data = fmt.Sprintf("%g", v) + default: + byts, err := json.Marshal(payload) + if err != nil { + return err + } + data = string(byts) } - data = string(byts) fmt.Fprintf(s.w, "data: %s\n\n", data) http.NewResponseController(s.w).Flush() @@ -110,11 +152,53 @@ func (s *MixedServerStreamServerStream) SendWithContext(ctx context.Context, v * res := v var data string - byts, err := json.Marshal(res) - if err != nil { - return err + var payload any + body := NewMixedServerStreamResponseBody(res) + payload = body + switch v := payload.(type) { + case nil: + data = "null" + case string: + data = v + case []byte: + data = string(v) + case bool: + if v { + data = "true" + } else { + data = "false" + } + case int: + data = fmt.Sprintf("%d", v) + case int8: + data = fmt.Sprintf("%d", v) + case int16: + data = fmt.Sprintf("%d", v) + case int32: + data = fmt.Sprintf("%d", v) + case int64: + data = fmt.Sprintf("%d", v) + case uint: + data = fmt.Sprintf("%d", v) + case uint8: + data = fmt.Sprintf("%d", v) + case uint16: + data = fmt.Sprintf("%d", v) + case uint32: + data = fmt.Sprintf("%d", v) + case uint64: + data = fmt.Sprintf("%d", v) + case float32: + data = fmt.Sprintf("%g", v) + case float64: + data = fmt.Sprintf("%g", v) + default: + byts, err := json.Marshal(payload) + if err != nil { + return err + } + data = string(byts) } - data = string(byts) fmt.Fprintf(s.w, "data: %s\n\n", data) http.NewResponseController(s.w).Flush() diff --git a/testing/examples/httpgrpc/gen/http/test_http_grpc/server/types.go b/testing/examples/httpgrpc/gen/http/test_http_grpc/server/types.go index 6623702e4..d301f4354 100644 --- a/testing/examples/httpgrpc/gen/http/test_http_grpc/server/types.go +++ b/testing/examples/httpgrpc/gen/http/test_http_grpc/server/types.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-http-grpc HTTP server types // diff --git a/testing/examples/httpgrpc/gen/http/test_http_grpc/server/websocket.go b/testing/examples/httpgrpc/gen/http/test_http_grpc/server/websocket.go index 72c5ccebc..0764a9b1f 100644 --- a/testing/examples/httpgrpc/gen/http/test_http_grpc/server/websocket.go +++ b/testing/examples/httpgrpc/gen/http/test_http_grpc/server/websocket.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-http-grpc WebSocket server streaming // diff --git a/testing/examples/httpgrpc/gen/test_http_grpc/client.go b/testing/examples/httpgrpc/gen/test_http_grpc/client.go index 3824b02e4..6e31d27df 100644 --- a/testing/examples/httpgrpc/gen/test_http_grpc/client.go +++ b/testing/examples/httpgrpc/gen/test_http_grpc/client.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-http-grpc client // diff --git a/testing/examples/httpgrpc/gen/test_http_grpc/endpoints.go b/testing/examples/httpgrpc/gen/test_http_grpc/endpoints.go index 511f7c787..0fcab6bde 100644 --- a/testing/examples/httpgrpc/gen/test_http_grpc/endpoints.go +++ b/testing/examples/httpgrpc/gen/test_http_grpc/endpoints.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-http-grpc endpoints // diff --git a/testing/examples/httpgrpc/gen/test_http_grpc/service.go b/testing/examples/httpgrpc/gen/test_http_grpc/service.go index 2ffd2a8a1..ac456bea8 100644 --- a/testing/examples/httpgrpc/gen/test_http_grpc/service.go +++ b/testing/examples/httpgrpc/gen/test_http_grpc/service.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-http-grpc service // @@ -66,6 +66,8 @@ var MethodNames = [15]string{"http_no_stream", "grpc_no_stream", "http_no_stream type HTTPServerStreamSseServerStream interface { // Send streams instances of "HTTPServerStreamSseResult". Send(*HTTPServerStreamSseResult) error + // SendWithContext streams instances of "HTTPServerStreamSseResult" with + // context. SendWithContext(context.Context, *HTTPServerStreamSseResult) error // Close closes the stream. Close() error @@ -74,7 +76,10 @@ type HTTPServerStreamSseServerStream interface { // HTTPServerStreamSseClientStream allows streaming instances of // *HTTPServerStreamSseResult to the client. type HTTPServerStreamSseClientStream interface { + // Recv reads instances of "HTTPServerStreamSseResult" from the stream. Recv() (*HTTPServerStreamSseResult, error) + // RecvWithContext reads instances of "HTTPServerStreamSseResult" from the + // stream with context. RecvWithContext(context.Context) (*HTTPServerStreamSseResult, error) } @@ -83,6 +88,7 @@ type HTTPServerStreamSseClientStream interface { type HTTPServerStreamWsServerStream interface { // Send streams instances of "HTTPServerStreamWsResult". Send(*HTTPServerStreamWsResult) error + // SendWithContext streams instances of "HTTPServerStreamWsResult" with context. SendWithContext(context.Context, *HTTPServerStreamWsResult) error // Close closes the stream. Close() error @@ -91,7 +97,10 @@ type HTTPServerStreamWsServerStream interface { // HTTPServerStreamWsClientStream allows streaming instances of // *HTTPServerStreamWsResult to the client. type HTTPServerStreamWsClientStream interface { + // Recv reads instances of "HTTPServerStreamWsResult" from the stream. Recv() (*HTTPServerStreamWsResult, error) + // RecvWithContext reads instances of "HTTPServerStreamWsResult" from the + // stream with context. RecvWithContext(context.Context) (*HTTPServerStreamWsResult, error) } @@ -100,6 +109,7 @@ type HTTPServerStreamWsClientStream interface { type GrpcServerStreamServerStream interface { // Send streams instances of "GrpcServerStreamResult". Send(*GrpcServerStreamResult) error + // SendWithContext streams instances of "GrpcServerStreamResult" with context. SendWithContext(context.Context, *GrpcServerStreamResult) error // Close closes the stream. Close() error @@ -108,7 +118,10 @@ type GrpcServerStreamServerStream interface { // GrpcServerStreamClientStream allows streaming instances of // *GrpcServerStreamResult to the client. type GrpcServerStreamClientStream interface { + // Recv reads instances of "GrpcServerStreamResult" from the stream. Recv() (*GrpcServerStreamResult, error) + // RecvWithContext reads instances of "GrpcServerStreamResult" from the stream + // with context. RecvWithContext(context.Context) (*GrpcServerStreamResult, error) } @@ -118,8 +131,13 @@ type HTTPClientStreamWsServerStream interface { // SendAndClose streams instances of "HTTPClientStreamWsResult" and closes the // stream. SendAndClose(*HTTPClientStreamWsResult) error + // SendAndCloseWithContext streams instances of "HTTPClientStreamWsResult" and + // closes the stream with context. SendAndCloseWithContext(context.Context, *HTTPClientStreamWsResult) error + // Recv reads instances of "HTTPClientStreamWsStreamingPayload" from the stream. Recv() (*HTTPClientStreamWsStreamingPayload, error) + // RecvWithContext reads instances of "HTTPClientStreamWsStreamingPayload" from + // the stream with context. RecvWithContext(context.Context) (*HTTPClientStreamWsStreamingPayload, error) } @@ -128,8 +146,14 @@ type HTTPClientStreamWsServerStream interface { type HTTPClientStreamWsClientStream interface { // Send streams instances of "HTTPClientStreamWsStreamingPayload". Send(*HTTPClientStreamWsStreamingPayload) error + // SendWithContext streams instances of "HTTPClientStreamWsStreamingPayload" + // with context. SendWithContext(context.Context, *HTTPClientStreamWsStreamingPayload) error + // CloseAndRecv stops sending messages to the stream and reads instances of + // "HTTPClientStreamWsResult" from the stream. CloseAndRecv() (*HTTPClientStreamWsResult, error) + // CloseAndRecvWithContext stops sending messages to the stream and reads + // instances of "HTTPClientStreamWsResult" from the stream with context. CloseAndRecvWithContext(context.Context) (*HTTPClientStreamWsResult, error) } @@ -139,8 +163,13 @@ type GrpcClientStreamServerStream interface { // SendAndClose streams instances of "GrpcClientStreamResult" and closes the // stream. SendAndClose(*GrpcClientStreamResult) error + // SendAndCloseWithContext streams instances of "GrpcClientStreamResult" and + // closes the stream with context. SendAndCloseWithContext(context.Context, *GrpcClientStreamResult) error + // Recv reads instances of "GrpcClientStreamStreamingPayload" from the stream. Recv() (*GrpcClientStreamStreamingPayload, error) + // RecvWithContext reads instances of "GrpcClientStreamStreamingPayload" from + // the stream with context. RecvWithContext(context.Context) (*GrpcClientStreamStreamingPayload, error) } @@ -149,8 +178,14 @@ type GrpcClientStreamServerStream interface { type GrpcClientStreamClientStream interface { // Send streams instances of "GrpcClientStreamStreamingPayload". Send(*GrpcClientStreamStreamingPayload) error + // SendWithContext streams instances of "GrpcClientStreamStreamingPayload" with + // context. SendWithContext(context.Context, *GrpcClientStreamStreamingPayload) error + // CloseAndRecv stops sending messages to the stream and reads instances of + // "GrpcClientStreamResult" from the stream. CloseAndRecv() (*GrpcClientStreamResult, error) + // CloseAndRecvWithContext stops sending messages to the stream and reads + // instances of "GrpcClientStreamResult" from the stream with context. CloseAndRecvWithContext(context.Context) (*GrpcClientStreamResult, error) } @@ -159,8 +194,12 @@ type GrpcClientStreamClientStream interface { type HTTPBidiStreamWsServerStream interface { // Send streams instances of "HTTPBidiStreamWsResult". Send(*HTTPBidiStreamWsResult) error + // SendWithContext streams instances of "HTTPBidiStreamWsResult" with context. SendWithContext(context.Context, *HTTPBidiStreamWsResult) error + // Recv reads instances of "HTTPBidiStreamWsStreamingPayload" from the stream. Recv() (*HTTPBidiStreamWsStreamingPayload, error) + // RecvWithContext reads instances of "HTTPBidiStreamWsStreamingPayload" from + // the stream with context. RecvWithContext(context.Context) (*HTTPBidiStreamWsStreamingPayload, error) // Close closes the stream. Close() error @@ -171,8 +210,13 @@ type HTTPBidiStreamWsServerStream interface { type HTTPBidiStreamWsClientStream interface { // Send streams instances of "HTTPBidiStreamWsStreamingPayload". Send(*HTTPBidiStreamWsStreamingPayload) error + // SendWithContext streams instances of "HTTPBidiStreamWsStreamingPayload" with + // context. SendWithContext(context.Context, *HTTPBidiStreamWsStreamingPayload) error + // Recv reads instances of "HTTPBidiStreamWsResult" from the stream. Recv() (*HTTPBidiStreamWsResult, error) + // RecvWithContext reads instances of "HTTPBidiStreamWsResult" from the stream + // with context. RecvWithContext(context.Context) (*HTTPBidiStreamWsResult, error) // Close closes the stream. Close() error @@ -183,8 +227,12 @@ type HTTPBidiStreamWsClientStream interface { type GrpcBidiStreamServerStream interface { // Send streams instances of "GrpcBidiStreamResult". Send(*GrpcBidiStreamResult) error + // SendWithContext streams instances of "GrpcBidiStreamResult" with context. SendWithContext(context.Context, *GrpcBidiStreamResult) error + // Recv reads instances of "GrpcBidiStreamStreamingPayload" from the stream. Recv() (*GrpcBidiStreamStreamingPayload, error) + // RecvWithContext reads instances of "GrpcBidiStreamStreamingPayload" from the + // stream with context. RecvWithContext(context.Context) (*GrpcBidiStreamStreamingPayload, error) // Close closes the stream. Close() error @@ -195,8 +243,13 @@ type GrpcBidiStreamServerStream interface { type GrpcBidiStreamClientStream interface { // Send streams instances of "GrpcBidiStreamStreamingPayload". Send(*GrpcBidiStreamStreamingPayload) error + // SendWithContext streams instances of "GrpcBidiStreamStreamingPayload" with + // context. SendWithContext(context.Context, *GrpcBidiStreamStreamingPayload) error + // Recv reads instances of "GrpcBidiStreamResult" from the stream. Recv() (*GrpcBidiStreamResult, error) + // RecvWithContext reads instances of "GrpcBidiStreamResult" from the stream + // with context. RecvWithContext(context.Context) (*GrpcBidiStreamResult, error) // Close closes the stream. Close() error @@ -207,6 +260,7 @@ type GrpcBidiStreamClientStream interface { type MixedServerStreamServerStream interface { // Send streams instances of "MixedServerStreamResult". Send(*MixedServerStreamResult) error + // SendWithContext streams instances of "MixedServerStreamResult" with context. SendWithContext(context.Context, *MixedServerStreamResult) error // Close closes the stream. Close() error @@ -215,7 +269,10 @@ type MixedServerStreamServerStream interface { // MixedServerStreamClientStream allows streaming instances of // *MixedServerStreamResult to the client. type MixedServerStreamClientStream interface { + // Recv reads instances of "MixedServerStreamResult" from the stream. Recv() (*MixedServerStreamResult, error) + // RecvWithContext reads instances of "MixedServerStreamResult" from the stream + // with context. RecvWithContext(context.Context) (*MixedServerStreamResult, error) } @@ -225,8 +282,14 @@ type MixedClientStreamWsGrpcServerStream interface { // SendAndClose streams instances of "MixedClientStreamWsGrpcResult" and closes // the stream. SendAndClose(*MixedClientStreamWsGrpcResult) error + // SendAndCloseWithContext streams instances of "MixedClientStreamWsGrpcResult" + // and closes the stream with context. SendAndCloseWithContext(context.Context, *MixedClientStreamWsGrpcResult) error + // Recv reads instances of "MixedClientStreamWsGrpcStreamingPayload" from the + // stream. Recv() (*MixedClientStreamWsGrpcStreamingPayload, error) + // RecvWithContext reads instances of "MixedClientStreamWsGrpcStreamingPayload" + // from the stream with context. RecvWithContext(context.Context) (*MixedClientStreamWsGrpcStreamingPayload, error) } @@ -235,8 +298,14 @@ type MixedClientStreamWsGrpcServerStream interface { type MixedClientStreamWsGrpcClientStream interface { // Send streams instances of "MixedClientStreamWsGrpcStreamingPayload". Send(*MixedClientStreamWsGrpcStreamingPayload) error + // SendWithContext streams instances of + // "MixedClientStreamWsGrpcStreamingPayload" with context. SendWithContext(context.Context, *MixedClientStreamWsGrpcStreamingPayload) error + // CloseAndRecv stops sending messages to the stream and reads instances of + // "MixedClientStreamWsGrpcResult" from the stream. CloseAndRecv() (*MixedClientStreamWsGrpcResult, error) + // CloseAndRecvWithContext stops sending messages to the stream and reads + // instances of "MixedClientStreamWsGrpcResult" from the stream with context. CloseAndRecvWithContext(context.Context) (*MixedClientStreamWsGrpcResult, error) } @@ -245,8 +314,14 @@ type MixedClientStreamWsGrpcClientStream interface { type MixedBidiStreamWsGrpcServerStream interface { // Send streams instances of "MixedBidiStreamWsGrpcResult". Send(*MixedBidiStreamWsGrpcResult) error + // SendWithContext streams instances of "MixedBidiStreamWsGrpcResult" with + // context. SendWithContext(context.Context, *MixedBidiStreamWsGrpcResult) error + // Recv reads instances of "MixedBidiStreamWsGrpcStreamingPayload" from the + // stream. Recv() (*MixedBidiStreamWsGrpcStreamingPayload, error) + // RecvWithContext reads instances of "MixedBidiStreamWsGrpcStreamingPayload" + // from the stream with context. RecvWithContext(context.Context) (*MixedBidiStreamWsGrpcStreamingPayload, error) // Close closes the stream. Close() error @@ -257,8 +332,13 @@ type MixedBidiStreamWsGrpcServerStream interface { type MixedBidiStreamWsGrpcClientStream interface { // Send streams instances of "MixedBidiStreamWsGrpcStreamingPayload". Send(*MixedBidiStreamWsGrpcStreamingPayload) error + // SendWithContext streams instances of "MixedBidiStreamWsGrpcStreamingPayload" + // with context. SendWithContext(context.Context, *MixedBidiStreamWsGrpcStreamingPayload) error + // Recv reads instances of "MixedBidiStreamWsGrpcResult" from the stream. Recv() (*MixedBidiStreamWsGrpcResult, error) + // RecvWithContext reads instances of "MixedBidiStreamWsGrpcResult" from the + // stream with context. RecvWithContext(context.Context) (*MixedBidiStreamWsGrpcResult, error) // Close closes the stream. Close() error diff --git a/testing/examples/httpgrpc/gen/test_http_grpc/test_http_grpctest/client.go b/testing/examples/httpgrpc/gen/test_http_grpc/test_http_grpctest/client.go index 96b6c1469..870a16703 100644 --- a/testing/examples/httpgrpc/gen/test_http_grpc/test_http_grpctest/client.go +++ b/testing/examples/httpgrpc/gen/test_http_grpc/test_http_grpctest/client.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // Test client for test-http-grpc service // diff --git a/testing/examples/httpgrpc/gen/test_http_grpc/test_http_grpctest/errors.go b/testing/examples/httpgrpc/gen/test_http_grpc/test_http_grpctest/errors.go index 0b9f46f35..1776304d9 100644 --- a/testing/examples/httpgrpc/gen/test_http_grpc/test_http_grpctest/errors.go +++ b/testing/examples/httpgrpc/gen/test_http_grpc/test_http_grpctest/errors.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // Error test helpers for test-http-grpc service // diff --git a/testing/examples/httpgrpc/gen/test_http_grpc/test_http_grpctest/harness.go b/testing/examples/httpgrpc/gen/test_http_grpc/test_http_grpctest/harness.go index cb0a686fe..2fd1678d2 100644 --- a/testing/examples/httpgrpc/gen/test_http_grpc/test_http_grpctest/harness.go +++ b/testing/examples/httpgrpc/gen/test_http_grpc/test_http_grpctest/harness.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // Test harness for test-http-grpc service // diff --git a/testing/examples/httpgrpc/gen/test_http_grpc/test_http_grpctest/scenarios.go b/testing/examples/httpgrpc/gen/test_http_grpc/test_http_grpctest/scenarios.go index e14c3b01e..4d8521169 100644 --- a/testing/examples/httpgrpc/gen/test_http_grpc/test_http_grpctest/scenarios.go +++ b/testing/examples/httpgrpc/gen/test_http_grpc/test_http_grpctest/scenarios.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // Scenario runner for test-http-grpc service // diff --git a/testing/examples/httpgrpc/gen/test_http_grpc/test_http_grpctest/testdata.go b/testing/examples/httpgrpc/gen/test_http_grpc/test_http_grpctest/testdata.go index 1f8f645eb..78a102842 100644 --- a/testing/examples/httpgrpc/gen/test_http_grpc/test_http_grpctest/testdata.go +++ b/testing/examples/httpgrpc/gen/test_http_grpc/test_http_grpctest/testdata.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // Test data generators for test-http-grpc service // diff --git a/testing/examples/httpgrpc/go.mod b/testing/examples/httpgrpc/go.mod index 90807dc61..f2cc5b13f 100644 --- a/testing/examples/httpgrpc/go.mod +++ b/testing/examples/httpgrpc/go.mod @@ -1,38 +1,38 @@ module goa.design/plugins/v3/testing/examples/httpgrpc -go 1.24.0 +go 1.24.4 require ( github.com/gorilla/websocket v1.5.3 - goa.design/clue v1.2.2 - goa.design/goa/v3 v3.22.1 + goa.design/clue v1.2.3 + goa.design/goa/v3 v3.22.6 goa.design/plugins/v3 v3.0.0 - google.golang.org/grpc v1.74.2 - google.golang.org/protobuf v1.36.7 + google.golang.org/grpc v1.76.0 + google.golang.org/protobuf v1.36.10 + gopkg.in/yaml.v3 v3.0.1 ) require ( - github.com/aws/smithy-go v1.22.5 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/aws/smithy-go v1.23.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect - github.com/go-chi/chi/v5 v5.2.2 // indirect + github.com/go-chi/chi/v5 v5.2.3 // indirect github.com/go-logr/logr v1.4.3 // indirect - github.com/gohugoio/hashstructure v0.5.0 // indirect + github.com/gohugoio/hashstructure v0.6.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/testify v1.10.0 // indirect - go.opentelemetry.io/otel v1.37.0 // indirect - go.opentelemetry.io/otel/trace v1.37.0 // indirect - golang.org/x/mod v0.27.0 // indirect - golang.org/x/net v0.43.0 // indirect - golang.org/x/sync v0.16.0 // indirect - golang.org/x/sys v0.35.0 // indirect - golang.org/x/term v0.34.0 // indirect - golang.org/x/text v0.28.0 // indirect - golang.org/x/tools v0.36.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250811230008-5f3141c8851a // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/stretchr/testify v1.11.1 // indirect + go.opentelemetry.io/otel v1.38.0 // indirect + go.opentelemetry.io/otel/trace v1.38.0 // indirect + golang.org/x/mod v0.29.0 // indirect + golang.org/x/net v0.46.0 // indirect + golang.org/x/sync v0.17.0 // indirect + golang.org/x/sys v0.37.0 // indirect + golang.org/x/term v0.36.0 // indirect + golang.org/x/text v0.30.0 // indirect + golang.org/x/tools v0.38.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20251014184007-4626949a642f // indirect ) replace goa.design/goa/v3 => /Users/raphael/src/goa diff --git a/testing/examples/httpgrpc/go.sum b/testing/examples/httpgrpc/go.sum index 6cb3e13b1..2193890d8 100644 --- a/testing/examples/httpgrpc/go.sum +++ b/testing/examples/httpgrpc/go.sum @@ -1,19 +1,19 @@ -github.com/aws/smithy-go v1.22.5 h1:P9ATCXPMb2mPjYBgueqJNCA5S9UfktsW0tTxi+a7eqw= -github.com/aws/smithy-go v1.22.5/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= +github.com/aws/smithy-go v1.23.1 h1:sLvcH6dfAFwGkHLZ7dGiYF7aK6mg4CgKA/iDKjLDt9M= +github.com/aws/smithy-go v1.23.1/go.mod h1:LEj2LM3rBRQJxPZTB4KuzZkaZYnZPnvgIhb4pu07mx0= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 h1:MGKhKyiYrvMDZsmLR/+RGffQSXwEkXgfLSA08qDn9AI= github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598/go.mod h1:0FpDmbrt36utu8jEmeU05dPC9AB5tsLYVVi+ZHfyuwI= -github.com/go-chi/chi/v5 v5.2.2 h1:CMwsvRVTbXVytCk1Wd72Zy1LAsAh9GxMmSNWLHCG618= -github.com/go-chi/chi/v5 v5.2.2/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops= +github.com/go-chi/chi/v5 v5.2.3 h1:WQIt9uxdsAbgIYgid+BpYc+liqQZGMHRaUwp0JUcvdE= +github.com/go-chi/chi/v5 v5.2.3/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/gohugoio/hashstructure v0.5.0 h1:G2fjSBU36RdwEJBWJ+919ERvOVqAg9tfcYp47K9swqg= -github.com/gohugoio/hashstructure v0.5.0/go.mod h1:Ser0TniXuu/eauYmrwM4o64EBvySxNzITEOLlm4igec= +github.com/gohugoio/hashstructure v0.6.0 h1:7wMB/2CfXoThFYhdWRGv3u3rUM761Cq29CxUW+NltUg= +github.com/gohugoio/hashstructure v0.6.0/go.mod h1:lapVLk9XidheHG1IQ4ZSbyYrXcaILU1ZEP/+vno5rBQ= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= @@ -22,51 +22,60 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d h1:Zj+PHjnhRYWBK6RqCDBcAhLXoi3TzC27Zad/Vn+gnVQ= github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d/go.mod h1:WZy8Q5coAB1zhY9AOBJP0O6J4BuDfbupUDavKY+I3+s= github.com/manveru/gobdd v0.0.0-20131210092515-f1a17fdd710b h1:3E44bLeN8uKYdfQqVQycPnaVviZdBLbizFhU49mtbe4= github.com/manveru/gobdd v0.0.0-20131210092515-f1a17fdd710b/go.mod h1:Bj8LjjP0ReT1eKt5QlKjwgi5AFm5mI6O1A2G4ChI0Ag= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ= -go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.36.0 h1:G8Xec/SgZQricwWBJF/mHZc7A02YHedfFDENwJEdRA0= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.36.0/go.mod h1:PD57idA/AiFD5aqoxGxCvT/ILJPeHy3MjqU/NS7KogY= -go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE= -go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E= -go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI= -go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg= -go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc= -go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps= -go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= -go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= -goa.design/clue v1.2.2 h1:rJDMdKnHyLecKEWvoapQ/1Fe4fcv1X91BrbllsBTtFM= -goa.design/clue v1.2.2/go.mod h1:H0q8ayIEcotYUtN9Vi+82knSo1fMtiUz5G2juqPma6M= -golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ= -golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= -golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= -golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= -golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= -golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= -golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4= -golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw= -golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= -golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= -golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= -golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250811230008-5f3141c8851a h1:tPE/Kp+x9dMSwUm/uM0JKK0IfdiJkwAbSMSeZBXXJXc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250811230008-5f3141c8851a/go.mod h1:gw1tLEfykwDz2ET4a12jcXt4couGAm7IwsVaTy0Sflo= -google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= -google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= -google.golang.org/protobuf v1.36.7 h1:IgrO7UwFQGJdRNXH/sQux4R1Dj1WAKcLElzeeRaXV2A= -google.golang.org/protobuf v1.36.7/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +go.opentelemetry.io/auto/sdk v1.2.0 h1:YpRtUFjvhSymycLS2T81lT6IGhcUP+LUPtv0iv1N8bM= +go.opentelemetry.io/auto/sdk v1.2.0/go.mod h1:1deq2zL7rwjwC8mR7XgY2N+tlIl6pjmEUoLDENMEzwk= +go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= +go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.38.0 h1:kJxSDN4SgWWTjG/hPp3O7LCGLcHXFlvS2/FFOrwL+SE= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.38.0/go.mod h1:mgIOzS7iZeKJdeB8/NYHrJ48fdGc71Llo5bJ1J4DWUE= +go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= +go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= +go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= +go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= +go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= +goa.design/clue v1.2.3 h1:ho2TkqaLjdt0/fA2ouwQSwPbq75RLI/2o5/4xYxyCj4= +goa.design/clue v1.2.3/go.mod h1:7/L931m3SrOfxebASs4/R3QP71K/4JUzUTol8mtk7wQ= +golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA= +golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w= +golang.org/x/net v0.46.0 h1:giFlY12I07fugqwPuWJi68oOnpfqFnJIJzaIIm2JVV4= +golang.org/x/net v0.46.0/go.mod h1:Q9BGdFy1y4nkUwiLvT5qtyhAnEHgnQ/zd8PfU6nc210= +golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= +golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ= +golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/term v0.36.0 h1:zMPR+aF8gfksFprF/Nc/rd1wRS1EI6nDBGyWAvDzx2Q= +golang.org/x/term v0.36.0/go.mod h1:Qu394IJq6V6dCBRgwqshf3mPF85AqzYEzofzRdZkWss= +golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k= +golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM= +golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ= +golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251014184007-4626949a642f h1:1FTH6cpXFsENbPR5Bu8NQddPSaUUE6NA2XdZdDSAJK4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251014184007-4626949a642f/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= +google.golang.org/grpc v1.76.0 h1:UnVkv1+uMLYXoIz6o7chp59WfQUYA2ex/BXQ9rHZu7A= +google.golang.org/grpc v1.76.0/go.mod h1:Ju12QI8M6iQJtbcsV+awF5a4hfJMLi4X0JLo94ULZ6c= +google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE= +google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/testing/examples/jsonrpc/gen/jsonrpc/cli/test_jsonrpc/cli.go b/testing/examples/jsonrpc/gen/jsonrpc/cli/test_jsonrpc/cli.go index f2c6a905a..c985e4828 100644 --- a/testing/examples/jsonrpc/gen/jsonrpc/cli/test_jsonrpc/cli.go +++ b/testing/examples/jsonrpc/gen/jsonrpc/cli/test_jsonrpc/cli.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-jsonrpc JSON-RPC client CLI support package // @@ -29,9 +29,7 @@ func UsageCommands() []string { // UsageExamples produces an example of a valid invocation of the CLI tool. func UsageExamples() string { - return os.Args[0] + ` test-jsonrpc jsonrpc-no-stream --body '{ - "msg": "Excepturi est sit quo quam." - }'` + "\n" + + return os.Args[0] + " " + "test-jsonrpc jsonrpc-no-stream --body '{\n \"msg\": \"Excepturi est sit quo quam.\"\n }'" + "\n" + "" } @@ -141,40 +139,47 @@ func ParseEndpoint( // testJsonrpcUsage displays the usage of the test-jsonrpc command and its // subcommands. func testJsonrpcUsage() { - fmt.Fprintf(os.Stderr, `Testing plugin matrix across JSON-RPC transports (non-streaming) -Usage: - %[1]s [globalflags] test-jsonrpc COMMAND [flags] - -COMMAND: - jsonrpc-no-stream: JsonrpcNoStream implements jsonrpc_no_stream. - jsonrpc-no-stream-error: JsonrpcNoStreamError implements jsonrpc_no_stream_error. - -Additional help: - %[1]s test-jsonrpc COMMAND --help -`, os.Args[0]) + fmt.Fprintln(os.Stderr, `Testing plugin matrix across JSON-RPC transports (non-streaming)`) + fmt.Fprintf(os.Stderr, "Usage:\n %s [globalflags] test-jsonrpc COMMAND [flags]\n\n", os.Args[0]) + fmt.Fprintln(os.Stderr, "COMMAND:") + fmt.Fprintln(os.Stderr, ` jsonrpc-no-stream: JsonrpcNoStream implements jsonrpc_no_stream.`) + fmt.Fprintln(os.Stderr, ` jsonrpc-no-stream-error: JsonrpcNoStreamError implements jsonrpc_no_stream_error.`) + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Additional help:") + fmt.Fprintf(os.Stderr, " %s test-jsonrpc COMMAND --help\n", os.Args[0]) } func testJsonrpcJsonrpcNoStreamUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] test-jsonrpc jsonrpc-no-stream -body JSON + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] test-jsonrpc jsonrpc-no-stream", os.Args[0]) + fmt.Fprint(os.Stderr, " -body JSON") + fmt.Fprintln(os.Stderr) -JsonrpcNoStream implements jsonrpc_no_stream. - -body JSON: + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `JsonrpcNoStream implements jsonrpc_no_stream.`) -Example: - %[1]s test-jsonrpc jsonrpc-no-stream --body '{ - "msg": "Excepturi est sit quo quam." - }' -`, os.Args[0]) + // Flags list + fmt.Fprintln(os.Stderr, ` -body JSON: `) + + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "test-jsonrpc jsonrpc-no-stream --body '{\n \"msg\": \"Excepturi est sit quo quam.\"\n }'") } func testJsonrpcJsonrpcNoStreamErrorUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] test-jsonrpc jsonrpc-no-stream-error -body JSON + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] test-jsonrpc jsonrpc-no-stream-error", os.Args[0]) + fmt.Fprint(os.Stderr, " -body JSON") + fmt.Fprintln(os.Stderr) + + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `JsonrpcNoStreamError implements jsonrpc_no_stream_error.`) -JsonrpcNoStreamError implements jsonrpc_no_stream_error. - -body JSON: + // Flags list + fmt.Fprintln(os.Stderr, ` -body JSON: `) -Example: - %[1]s test-jsonrpc jsonrpc-no-stream-error --body '{ - "msg": "Fuga illum cum voluptatem." - }' -`, os.Args[0]) + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "test-jsonrpc jsonrpc-no-stream-error --body '{\n \"msg\": \"Fuga illum cum voluptatem.\"\n }'") } diff --git a/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/client/cli.go b/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/client/cli.go index dfe2c6658..6f0a00d78 100644 --- a/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/client/cli.go +++ b/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/client/cli.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-jsonrpc JSON-RPC client CLI support package // diff --git a/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/client/client.go b/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/client/client.go index a1f0e6fb2..28c6dbf2c 100644 --- a/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/client/client.go +++ b/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/client/client.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-jsonrpc client JSON-RPC transport // diff --git a/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/client/encode_decode.go b/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/client/encode_decode.go index 01526b522..1fde5cab7 100644 --- a/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/client/encode_decode.go +++ b/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/client/encode_decode.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-jsonrpc JSON-RPC client encoders and decoders // diff --git a/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/client/paths.go b/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/client/paths.go index 6fbb9aebe..2cc62709c 100644 --- a/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/client/paths.go +++ b/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/client/paths.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // JSON-RPC request path constructors for the test-jsonrpc service. // diff --git a/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/client/types.go b/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/client/types.go index 194fc6795..545b2b056 100644 --- a/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/client/types.go +++ b/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/client/types.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-jsonrpc HTTP client types // diff --git a/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/server/encode_decode.go b/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/server/encode_decode.go index 408831fc6..52f394900 100644 --- a/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/server/encode_decode.go +++ b/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/server/encode_decode.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-jsonrpc JSON-RPC server encoders and decoders // diff --git a/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/server/paths.go b/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/server/paths.go index 7f0fba96b..38bdae92e 100644 --- a/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/server/paths.go +++ b/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/server/paths.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // JSON-RPC request path constructors for the test-jsonrpc service. // diff --git a/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/server/server.go b/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/server/server.go index e2224c257..1a9b07099 100644 --- a/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/server/server.go +++ b/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/server/server.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-jsonrpc JSON-RPC server // @@ -211,6 +211,7 @@ func (rb *batchWriter) Write(data []byte) (int, error) { // Mount configures the mux to serve the JSON-RPC test-jsonrpc service methods. func Mount(mux goahttp.Muxer, h *Server) { + // HTTP only mux.Handle("POST", "/", h.ServeHTTP) } @@ -257,6 +258,10 @@ func NewJsonrpcNoStreamHandler( return nil } switch en.GoaErrorName() { + case "invalid_params": + encodeJSONRPCError(ctx, w, req, jsonrpc.InvalidParams, err.Error(), nil, encoder, errhandler) + case "method_not_found": + encodeJSONRPCError(ctx, w, req, jsonrpc.MethodNotFound, err.Error(), nil, encoder, errhandler) default: code := jsonrpc.InternalError if _, ok := err.(*goa.ServiceError); ok { @@ -332,6 +337,10 @@ func NewJsonrpcNoStreamErrorHandler( return nil } switch en.GoaErrorName() { + case "invalid_params": + encodeJSONRPCError(ctx, w, req, jsonrpc.InvalidParams, err.Error(), nil, encoder, errhandler) + case "method_not_found": + encodeJSONRPCError(ctx, w, req, jsonrpc.MethodNotFound, err.Error(), nil, encoder, errhandler) default: code := jsonrpc.InternalError if _, ok := err.(*goa.ServiceError); ok { diff --git a/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/server/types.go b/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/server/types.go index 9a60e3fdf..ab7fdfa44 100644 --- a/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/server/types.go +++ b/testing/examples/jsonrpc/gen/jsonrpc/test_jsonrpc/server/types.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-jsonrpc JSON-RPC server types // diff --git a/testing/examples/jsonrpc/gen/test_jsonrpc/client.go b/testing/examples/jsonrpc/gen/test_jsonrpc/client.go index 6065eeb6e..30c888ae0 100644 --- a/testing/examples/jsonrpc/gen/test_jsonrpc/client.go +++ b/testing/examples/jsonrpc/gen/test_jsonrpc/client.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-jsonrpc client // diff --git a/testing/examples/jsonrpc/gen/test_jsonrpc/endpoints.go b/testing/examples/jsonrpc/gen/test_jsonrpc/endpoints.go index eb7517d7a..97ad3a6eb 100644 --- a/testing/examples/jsonrpc/gen/test_jsonrpc/endpoints.go +++ b/testing/examples/jsonrpc/gen/test_jsonrpc/endpoints.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-jsonrpc endpoints // diff --git a/testing/examples/jsonrpc/gen/test_jsonrpc/service.go b/testing/examples/jsonrpc/gen/test_jsonrpc/service.go index 96d6c96e7..a6ee65601 100644 --- a/testing/examples/jsonrpc/gen/test_jsonrpc/service.go +++ b/testing/examples/jsonrpc/gen/test_jsonrpc/service.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // test-jsonrpc service // diff --git a/testing/examples/jsonrpc/gen/test_jsonrpc/test_jsonrpctest/client.go b/testing/examples/jsonrpc/gen/test_jsonrpc/test_jsonrpctest/client.go index 57c9c93ac..24e05ac07 100644 --- a/testing/examples/jsonrpc/gen/test_jsonrpc/test_jsonrpctest/client.go +++ b/testing/examples/jsonrpc/gen/test_jsonrpc/test_jsonrpctest/client.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // Test client for test-jsonrpc service // diff --git a/testing/examples/jsonrpc/gen/test_jsonrpc/test_jsonrpctest/errors.go b/testing/examples/jsonrpc/gen/test_jsonrpc/test_jsonrpctest/errors.go index 2a8d85df3..01466e915 100644 --- a/testing/examples/jsonrpc/gen/test_jsonrpc/test_jsonrpctest/errors.go +++ b/testing/examples/jsonrpc/gen/test_jsonrpc/test_jsonrpctest/errors.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // Error test helpers for test-jsonrpc service // diff --git a/testing/examples/jsonrpc/gen/test_jsonrpc/test_jsonrpctest/harness.go b/testing/examples/jsonrpc/gen/test_jsonrpc/test_jsonrpctest/harness.go index ebbcc0ba1..bb0468fed 100644 --- a/testing/examples/jsonrpc/gen/test_jsonrpc/test_jsonrpctest/harness.go +++ b/testing/examples/jsonrpc/gen/test_jsonrpc/test_jsonrpctest/harness.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // Test harness for test-jsonrpc service // diff --git a/testing/examples/jsonrpc/gen/test_jsonrpc/test_jsonrpctest/scenarios.go b/testing/examples/jsonrpc/gen/test_jsonrpc/test_jsonrpctest/scenarios.go index 08f842619..6f18eb43f 100644 --- a/testing/examples/jsonrpc/gen/test_jsonrpc/test_jsonrpctest/scenarios.go +++ b/testing/examples/jsonrpc/gen/test_jsonrpc/test_jsonrpctest/scenarios.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // Scenario runner for test-jsonrpc service // diff --git a/testing/examples/jsonrpc/gen/test_jsonrpc/test_jsonrpctest/testdata.go b/testing/examples/jsonrpc/gen/test_jsonrpc/test_jsonrpctest/testdata.go index 6f2a18a12..b24f2b6f0 100644 --- a/testing/examples/jsonrpc/gen/test_jsonrpc/test_jsonrpctest/testdata.go +++ b/testing/examples/jsonrpc/gen/test_jsonrpc/test_jsonrpctest/testdata.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.22.1, DO NOT EDIT. +// Code generated by goa v3.22.6, DO NOT EDIT. // // Test data generators for test-jsonrpc service // diff --git a/testing/examples/jsonrpc/go.mod b/testing/examples/jsonrpc/go.mod index 85b08131d..46b94d2e6 100644 --- a/testing/examples/jsonrpc/go.mod +++ b/testing/examples/jsonrpc/go.mod @@ -1,38 +1,38 @@ module goa.design/plugins/v3/testing/examples/jsonrpc -go 1.24.0 +go 1.24.4 require ( github.com/google/uuid v1.6.0 - goa.design/clue v1.2.2 - goa.design/goa/v3 v3.22.1 + goa.design/clue v1.2.3 + goa.design/goa/v3 v3.22.6 goa.design/plugins/v3 v3.21.5 + gopkg.in/yaml.v3 v3.0.1 ) require ( - github.com/aws/smithy-go v1.22.5 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/aws/smithy-go v1.23.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect - github.com/go-chi/chi/v5 v5.2.2 // indirect + github.com/go-chi/chi/v5 v5.2.3 // indirect github.com/go-logr/logr v1.4.3 // indirect - github.com/gohugoio/hashstructure v0.5.0 // indirect + github.com/gohugoio/hashstructure v0.6.0 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/testify v1.10.0 // indirect - go.opentelemetry.io/otel v1.37.0 // indirect - go.opentelemetry.io/otel/trace v1.37.0 // indirect - golang.org/x/mod v0.27.0 // indirect - golang.org/x/net v0.43.0 // indirect - golang.org/x/sync v0.16.0 // indirect - golang.org/x/sys v0.35.0 // indirect - golang.org/x/term v0.34.0 // indirect - golang.org/x/text v0.28.0 // indirect - golang.org/x/tools v0.36.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250811230008-5f3141c8851a // indirect - google.golang.org/grpc v1.74.2 // indirect - google.golang.org/protobuf v1.36.7 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/stretchr/testify v1.11.1 // indirect + go.opentelemetry.io/otel v1.38.0 // indirect + go.opentelemetry.io/otel/trace v1.38.0 // indirect + golang.org/x/mod v0.29.0 // indirect + golang.org/x/net v0.46.0 // indirect + golang.org/x/sync v0.17.0 // indirect + golang.org/x/sys v0.37.0 // indirect + golang.org/x/term v0.36.0 // indirect + golang.org/x/text v0.30.0 // indirect + golang.org/x/tools v0.38.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20251014184007-4626949a642f // indirect + google.golang.org/grpc v1.76.0 // indirect + google.golang.org/protobuf v1.36.10 // indirect ) replace goa.design/goa/v3 => /Users/raphael/src/goa diff --git a/testing/examples/jsonrpc/go.sum b/testing/examples/jsonrpc/go.sum index fa2d72aae..2193890d8 100644 --- a/testing/examples/jsonrpc/go.sum +++ b/testing/examples/jsonrpc/go.sum @@ -1,19 +1,19 @@ -github.com/aws/smithy-go v1.22.5 h1:P9ATCXPMb2mPjYBgueqJNCA5S9UfktsW0tTxi+a7eqw= -github.com/aws/smithy-go v1.22.5/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= +github.com/aws/smithy-go v1.23.1 h1:sLvcH6dfAFwGkHLZ7dGiYF7aK6mg4CgKA/iDKjLDt9M= +github.com/aws/smithy-go v1.23.1/go.mod h1:LEj2LM3rBRQJxPZTB4KuzZkaZYnZPnvgIhb4pu07mx0= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 h1:MGKhKyiYrvMDZsmLR/+RGffQSXwEkXgfLSA08qDn9AI= github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598/go.mod h1:0FpDmbrt36utu8jEmeU05dPC9AB5tsLYVVi+ZHfyuwI= -github.com/go-chi/chi/v5 v5.2.2 h1:CMwsvRVTbXVytCk1Wd72Zy1LAsAh9GxMmSNWLHCG618= -github.com/go-chi/chi/v5 v5.2.2/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops= +github.com/go-chi/chi/v5 v5.2.3 h1:WQIt9uxdsAbgIYgid+BpYc+liqQZGMHRaUwp0JUcvdE= +github.com/go-chi/chi/v5 v5.2.3/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/gohugoio/hashstructure v0.5.0 h1:G2fjSBU36RdwEJBWJ+919ERvOVqAg9tfcYp47K9swqg= -github.com/gohugoio/hashstructure v0.5.0/go.mod h1:Ser0TniXuu/eauYmrwM4o64EBvySxNzITEOLlm4igec= +github.com/gohugoio/hashstructure v0.6.0 h1:7wMB/2CfXoThFYhdWRGv3u3rUM761Cq29CxUW+NltUg= +github.com/gohugoio/hashstructure v0.6.0/go.mod h1:lapVLk9XidheHG1IQ4ZSbyYrXcaILU1ZEP/+vno5rBQ= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= @@ -22,56 +22,60 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d h1:Zj+PHjnhRYWBK6RqCDBcAhLXoi3TzC27Zad/Vn+gnVQ= github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d/go.mod h1:WZy8Q5coAB1zhY9AOBJP0O6J4BuDfbupUDavKY+I3+s= github.com/manveru/gobdd v0.0.0-20131210092515-f1a17fdd710b h1:3E44bLeN8uKYdfQqVQycPnaVviZdBLbizFhU49mtbe4= github.com/manveru/gobdd v0.0.0-20131210092515-f1a17fdd710b/go.mod h1:Bj8LjjP0ReT1eKt5QlKjwgi5AFm5mI6O1A2G4ChI0Ag= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ= -go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.36.0 h1:G8Xec/SgZQricwWBJF/mHZc7A02YHedfFDENwJEdRA0= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.36.0/go.mod h1:PD57idA/AiFD5aqoxGxCvT/ILJPeHy3MjqU/NS7KogY= -go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE= -go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E= -go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI= -go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg= -go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc= -go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps= -go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= -go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= -goa.design/clue v1.2.2 h1:rJDMdKnHyLecKEWvoapQ/1Fe4fcv1X91BrbllsBTtFM= -goa.design/clue v1.2.2/go.mod h1:H0q8ayIEcotYUtN9Vi+82knSo1fMtiUz5G2juqPma6M= -golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ= -golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= -golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= -golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= -golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= -golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= -golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4= -golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw= -golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= -golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= -golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= -golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250811230008-5f3141c8851a h1:tPE/Kp+x9dMSwUm/uM0JKK0IfdiJkwAbSMSeZBXXJXc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250811230008-5f3141c8851a/go.mod h1:gw1tLEfykwDz2ET4a12jcXt4couGAm7IwsVaTy0Sflo= -google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= -google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= -google.golang.org/protobuf v1.36.7 h1:IgrO7UwFQGJdRNXH/sQux4R1Dj1WAKcLElzeeRaXV2A= -google.golang.org/protobuf v1.36.7/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +go.opentelemetry.io/auto/sdk v1.2.0 h1:YpRtUFjvhSymycLS2T81lT6IGhcUP+LUPtv0iv1N8bM= +go.opentelemetry.io/auto/sdk v1.2.0/go.mod h1:1deq2zL7rwjwC8mR7XgY2N+tlIl6pjmEUoLDENMEzwk= +go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= +go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.38.0 h1:kJxSDN4SgWWTjG/hPp3O7LCGLcHXFlvS2/FFOrwL+SE= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.38.0/go.mod h1:mgIOzS7iZeKJdeB8/NYHrJ48fdGc71Llo5bJ1J4DWUE= +go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= +go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= +go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= +go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= +go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= +goa.design/clue v1.2.3 h1:ho2TkqaLjdt0/fA2ouwQSwPbq75RLI/2o5/4xYxyCj4= +goa.design/clue v1.2.3/go.mod h1:7/L931m3SrOfxebASs4/R3QP71K/4JUzUTol8mtk7wQ= +golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA= +golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w= +golang.org/x/net v0.46.0 h1:giFlY12I07fugqwPuWJi68oOnpfqFnJIJzaIIm2JVV4= +golang.org/x/net v0.46.0/go.mod h1:Q9BGdFy1y4nkUwiLvT5qtyhAnEHgnQ/zd8PfU6nc210= +golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= +golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ= +golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/term v0.36.0 h1:zMPR+aF8gfksFprF/Nc/rd1wRS1EI6nDBGyWAvDzx2Q= +golang.org/x/term v0.36.0/go.mod h1:Qu394IJq6V6dCBRgwqshf3mPF85AqzYEzofzRdZkWss= +golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k= +golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM= +golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ= +golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251014184007-4626949a642f h1:1FTH6cpXFsENbPR5Bu8NQddPSaUUE6NA2XdZdDSAJK4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251014184007-4626949a642f/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= +google.golang.org/grpc v1.76.0 h1:UnVkv1+uMLYXoIz6o7chp59WfQUYA2ex/BXQ9rHZu7A= +google.golang.org/grpc v1.76.0/go.mod h1:Ju12QI8M6iQJtbcsV+awF5a4hfJMLi4X0JLo94ULZ6c= +google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE= +google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=