Created
May 4, 2020 14:33
-
-
Save AntonStoeckl/ea359c6c6812a2b1eaaee9e9efcb883c to your computer and use it in GitHub Desktop.
Example for my iDDD with Go blog article series at https://medium.com/@TonyBologni
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
package customer | |
import ( | |
"github.com/AntonStoeckl/go-iddd/service/customeraccounts/application/domain/customer/value" | |
"github.com/AntonStoeckl/go-iddd/service/shared" | |
"github.com/cockroachdb/errors" | |
) | |
func assertMatchingConfirmationHash(current value.ConfirmationHash, supplied value.ConfirmationHash) error { | |
if !current.Equals(supplied) { | |
return errors.Mark(errors.New("wrong confirmation hash supplied"), shared.ErrDomainConstraintsViolation) | |
} | |
return nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment