Skip to content

Mains Plugin does not work with FILES() DSL #223

@ichbestimmtnicht

Description

@ichbestimmtnicht

The generated svc.New() call does not include enough http.FileSystem calls.

Example Errors with 10 Files() endpoints:

not enough arguments in call to staticsvr.New
have (*static.Endpoints, "goa.design/goa/v3/http".ResolverMuxer, func(r *"net/http".Request) "goa.design/goa/v3/http".Decoder, func(ctx context.Context, w "net/http".ResponseWriter) "goa.design/goa/v3/http".Encoder, nil, nil)
want (static.Endpoints, "goa.design/goa/v3/http".Muxer, func("net/http".Request) "goa.design/goa/v3/http".Decoder, func(context.Context, "net/http".ResponseWriter) "goa.design/goa/v3/http".Encoder, func(context.Context, "net/http".ResponseWriter, error), func(ctx context.Context, err error) "goa.design/goa/v3/http".Statuser, "net/http".FileSystem, "net/http".FileSystem, "net/http".FileSystem, "net/http".FileSystem, "net/http".FileSystem, "net/http".FileSystem, "net/http".FileSystem, "net/http".FileSystem, "net/http".FileSystem, "net/http".FileSystem)compilerWrongArgCount

Checked the corresponding code in case I missed something in my DSL setup:

{{- if .HasWebSocket }}
{{ .SrvVar }} := {{ .GenHTTPPkg }}.New({{ .EpVar }}, mux, goahttp.RequestDecoder, goahttp.ResponseEncoder, nil, nil, upgrader, nil)
{{- else }}
{{ .SrvVar }} := {{ .GenHTTPPkg }}.New({{ .EpVar }}, mux, goahttp.RequestDecoder, goahttp.ResponseEncoder, nil, nil)
{{- end }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions