Export a const for validation methods

This commit is contained in:
Paul Tyng 2018-03-10 12:40:37 -05:00 committed by GitHub
parent 557bc1a349
commit f18e4f2921
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -18,6 +18,11 @@ func UniqueId() string {
return PrefixedUniqueId(UniqueIdPrefix)
}
// UniqueIDSuffixLength is the string length of the suffix generated by
// PrefixedUniqueId. This can be used by length validation functions to
// ensure prefixes are the correct length for the target field.
const UniqueIDSuffixLength = 26
// Helper for a resource to generate a unique identifier w/ given prefix
//
// After the prefix, the ID consists of an incrementing 26 digit value (to match