Skip to content

Instantly share code, notes, and snippets.

@axel-andrade
Last active October 17, 2021 03:46
Show Gist options
  • Save axel-andrade/d3aaec4c392b0303d954475bb3ba068b to your computer and use it in GitHub Desktop.
Save axel-andrade/d3aaec4c392b0303d954475bb3ba068b to your computer and use it in GitHub Desktop.
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