Last active
May 4, 2020 14:33
-
-
Save AntonStoeckl/826e6fd1017eec2955c6653de6d3410d 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/shared" | |
"github.com/cockroachdb/errors" | |
) | |
func assertNotDeleted(currentState currentState) error { | |
if currentState.isDeleted { | |
return errors.Mark(errors.New("customer was deleted"), shared.ErrNotFound) | |
} | |
return nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment