1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/pkg/stringid
Sebastiaan van Stijn 78eab14d0b
Minor refactor and beter coverage for pkg/stringid
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>
2016-07-20 00:23:06 +02:00
..
README.md Refactor pkg/common, Fixes #11599 2015-03-24 18:19:59 +01:00
stringid.go Minor refactor and beter coverage for pkg/stringid 2016-07-20 00:23:06 +02:00
stringid_test.go Minor refactor and beter coverage for pkg/stringid 2016-07-20 00:23:06 +02:00

This package provides helper functions for dealing with string identifiers