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

Support pointer and non-pointer for SetResult and SetError methods #1

Closed
jeevatkm opened this issue Sep 20, 2015 · 1 comment
Closed
Assignees

Comments

@jeevatkm
Copy link
Member

SetResult:

// Note: Result object can be pointer or non-pointer.
resty.R().SetResult(&AuthToken{})
// OR
resty.R().SetResult(AuthToken{})

// Accessing a result value
response.Result().(*AuthToken)

SetError:

// Note: Error object can be pointer or non-pointer.
resty.R().SetError(&AuthError{})
// OR
resty.R().SetError(AuthError{})

// Accessing a error value
response.Error().(*AuthError)
@jeevatkm
Copy link
Member Author

Its done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant