Last active
October 17, 2021 03:46
-
-
Save axel-andrade/d3aaec4c392b0303d954475bb3ba068b to your computer and use it in GitHub Desktop.
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
package entities | |
import ( | |
"errors" | |
ERROR "go_clean_api/api/shared/constants/errors" | |
v "go_clean_api/api/shared/validators" | |
) | |
type UniqueEntityID = string | |
func validate(id UniqueEntityID) error { | |
if !v.IsValidUniqueEntityID(id) { | |
return errors.New(ERROR.INVALID_UNIQUE_ENTITY_ID) | |
} | |
return nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment