1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2025-03-09 00:00:02 +01:00

Make ID.Str() handle nil ids correctly

This commit is contained in:
Alexander Neumann 2015-03-15 19:05:25 +01:00
parent 2abda75404
commit 702b6cfc1e

View file

@ -38,6 +38,9 @@ func (id ID) String() string {
const shortStr = 4
func (id ID) Str() string {
if id == nil {
return "[nil]"
}
return hex.EncodeToString(id[:shortStr])
}