Use common identifiers package with less restrictive regex

Regular expressions in the namespaces package are redundant with the
pre-existing validator in the "identifiers" package; replace this custom
usage with the validator in "identifiers"

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
This commit is contained in:
Phil Estes
2019-11-04 19:12:35 -05:00
parent 4d7739527e
commit 76aa4e546e
5 changed files with 5 additions and 157 deletions

View File

@@ -225,7 +225,7 @@ func validateTopic(topic string) error {
}
func validateEnvelope(envelope *events.Envelope) error {
if err := namespaces.Validate(envelope.Namespace); err != nil {
if err := identifiers.Validate(envelope.Namespace); err != nil {
return errors.Wrapf(err, "event envelope has invalid namespace")
}