forked from irahardianto/service-pattern-go
-
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.
add score calculation, hystrix and unit tests
- Loading branch information
Muhammad Ichsan R
authored and
Muhammad Ichsan R
committed
Sep 12, 2017
1 parent
2602a54
commit 013cc39
Showing
16 changed files
with
127 additions
and
180 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
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 |
---|---|---|
@@ -1,17 +1,15 @@ | ||
package helpers | ||
|
||
import ( | ||
"github.com/irahardianto/service-pattern-go/models" | ||
"github.com/irahardianto/service-pattern-go/viewmodels" | ||
) | ||
|
||
type PlayerHelper struct{} | ||
|
||
func (helper *PlayerHelper) BuildPlayerVM(model models.PlayerModel) viewmodels.PlayerVM { | ||
func (helper *PlayerHelper) BuildScoresVM(scores string) viewmodels.ScoresVM { | ||
|
||
playerVM := viewmodels.PlayerVM{} | ||
playerVM.Name = model.Name | ||
playerVM.Score = model.Score | ||
scoresVM := viewmodels.ScoresVM{} | ||
scoresVM.Score = scores | ||
|
||
return playerVM | ||
return scoresVM | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Binary file not shown.
Oops, something went wrong.