-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(connect_callee.go): remove pointer receiver from Call method…
… to improve semantics refactor(connect_service.go): remove pointer receiver from Call method to improve semantics feat(error_callee.go): add new errorCallee struct to simulate an error in the callee refactor(fake_callee.go): remove pointer receiver from Call method to improve semantics refactor(http_callee.go): remove pointer receiver from Call method to improve semantics refactor(http_service.go): remove pointer receiver from Handler method to improve semantics feat(main.go): add support for errorCallee mode to simulate an error in the callee
- Loading branch information
1 parent
f77eb19
commit fc4aaf3
Showing
7 changed files
with
23 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package main | ||
|
||
import ( | ||
"context" | ||
"errors" | ||
) | ||
|
||
type errorCallee struct{} | ||
|
||
func NewErrorCallee() *errorCallee { | ||
return &errorCallee{} | ||
} | ||
|
||
func (c errorCallee) Call(ctx context.Context, msg Message) (Message, error) { | ||
return Message{}, errors.New("error in callee") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters