78eab14d0b
This slightly simplifies TruncateID() by only trimming the string if needed. Also improved unit-tests for this package; - Add a test for GenerateNonCryptoID() - Add a test for shortening a sha-256 ID - Make TestShortenId() more "unit", by using a fixed string, instead of calling GenerateRandomID() Signed-off-by: Sebastiaan van Stijn <github@gone.nl> |
||
---|---|---|
.. | ||
README.md | ||
stringid.go | ||
stringid_test.go |
This package provides helper functions for dealing with string identifiers