Skip to content

Custom alias for slice produces empty struct instead of slice #20

@kukymbr

Description

@kukymbr

Version of zenrpc: v2.2.12

Steps to reproduce

  1. Create a custom type representing a slice of some items, for example:
    type ValidationErrors []ValidationError
  2. Create an endpoint definition func returning the custom type:
    func (srv Service) Validate(ctx context.Context, req Request) (ValidationErrors, error) { }
  3. Generate go client using the RPCGen.GoClient()

Expected result

Generated function for an endpoint returns a custom type representing a slice of items or a slice of items directly.

Actual result

Generated function for an endpoint returns a custom type representing an empty struct:

type ValidationErrors struct {
}

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