Skip to content
This repository was archived by the owner on Apr 11, 2026. It is now read-only.

hashamali/gid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gid

godoc tests sec coverage go-report license

Helper that converts UUIDs to base62 short IDs (which are 22 characters long), or strings without dashes. And vice versa.

API

  • GetShortID: Converts a UUID into a base62 encoded 22 character string.
  • GetUUIDFromShortID: Converts a valid base62 encoded 22 character string into a UUID, returns an error if invalid.
  • GetCollapsedID: Converts a UUID into a string with no dashes.
  • GetUUIDFromShortID: Converts a valid 32 character string into a UUID, returns an error if invalid.

Testing

make test

About

Convert UUIDs to short IDs and vice versa.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors