Skip to content

Need to support maps and interfaces as definition #25

@anilsenay

Description

@anilsenay
  • Need to support maps:

response.New(map[string]string{"field1": "value", "field2": "value"}, "OK", "200")
response.New(map[string]interface{}{"field1": "value", "field2": 12345}, "OK", "200")

  • Need to support interfaces:
type SuccessResponse struct{
  StatusCode int `json:"status"`
  Data interface{} `json:"data"`
}

response.New(SuccessResponse{ Data: SomeStruct{} }, "OK", "200")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions