fix typos in pkg

Signed-off-by: allencloud <allen.sun@daocloud.io>
This commit is contained in:
allencloud 2016-04-09 21:18:15 +08:00
parent 3f3ba02798
commit b8047bf930
10 changed files with 12 additions and 12 deletions

View file

@ -24,7 +24,7 @@ func IsShortID(id string) bool {
// TruncateID returns a shorthand version of a string identifier for convenience.
// A collision with other shorthands is very unlikely, but possible.
// In case of a collision a lookup with TruncIndex.Get() will fail, and the caller
// will need to use a langer prefix, or the full-length Id.
// will need to use a longer prefix, or the full-length Id.
func TruncateID(id string) string {
if i := strings.IndexRune(id, ':'); i >= 0 {
id = id[i+1:]
@ -57,7 +57,7 @@ func generateID(crypto bool) string {
}
}
// GenerateRandomID returns an unique id.
// GenerateRandomID returns a unique id.
func GenerateRandomID() string {
return generateID(true)