Skip to content

Commit 459b15c

Browse files
Merge pull request #263 from devtron-labs/generate-ucid
misc: generate ucid
2 parents f8dc683 + e79c232 commit 459b15c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

common-lib/utils/CommonUtils.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ func Generate(size int) string {
5252
return str
5353
}
5454

55+
// GenerateUCID generates UCID of len 16
56+
func GenerateUCID() string {
57+
return Generate(16)
58+
}
59+
5560
func hasScheme(url string) bool {
5661
return len(url) >= 7 && (url[:7] == "http://" || url[:8] == "https://")
5762
}

0 commit comments

Comments
 (0)