Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to support maps and interfaces as definition #25

Open
anilsenay opened this issue Dec 19, 2023 · 0 comments
Open

Need to support maps and interfaces as definition #25

anilsenay opened this issue Dec 19, 2023 · 0 comments

Comments

@anilsenay
Copy link
Member

  • 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")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant