Last active
October 29, 2018 16:20
-
-
Save cn0047/3f98f2f6c8183ab80340f07ebf5b3d38 to your computer and use it in GitHub Desktop.
GO ValueObject - example 3
This file contains hidden or 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
| func CreateNewUser() { | |
| vo, err := CreateUserVO.New(params) // params - map with vo params | |
| if err != nil { | |
| // just handle errors: vo.GetErrors() | |
| } | |
| // ... | |
| db.SaveUser(vo) | |
| mailer.SendEmail(vo) | |
| search.AddUser(vo) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment