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

Adds getter and setter to response handler pointer #32

Merged
merged 1 commit into from Sep 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/go.yml
Expand Up @@ -22,3 +22,6 @@ jobs:
- name: Build SDK project
run: go build
working-directory: ${{ env.relativePath }}
- name: Test SDK
run: go test
working-directory: ${{ env.relativePath }}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Expand Up @@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

## [0.10.1] - 2022-09-14

### Changed

- Fix: Add getter and setter on `ResponseHandler` pointer .

## [0.10.0] - 2022-09-02

### Added
Expand Down
12 changes: 6 additions & 6 deletions request_handler_option.go
Expand Up @@ -12,22 +12,22 @@ var ResponseHandlerOptionKey = RequestOptionKey{
}

type requestHandlerOption struct {
responseHandler ResponseHandler
handler ResponseHandler
}

// NewRequestHandlerOption creates a new RequestInformation object with default values.
func NewRequestHandlerOption() RequestHandlerOption {
return &requestHandlerOption{}
}

func (r requestHandlerOption) GetResponseHandler() ResponseHandler {
return r.responseHandler
func (r *requestHandlerOption) GetResponseHandler() ResponseHandler {
return r.handler
}

func (r requestHandlerOption) SetResponseHandler(responseHandler ResponseHandler) {
r.responseHandler = responseHandler
func (r *requestHandlerOption) SetResponseHandler(responseHandler ResponseHandler) {
r.handler = responseHandler
}

func (r requestHandlerOption) GetKey() RequestOptionKey {
func (r *requestHandlerOption) GetKey() RequestOptionKey {
return ResponseHandlerOptionKey
}