mirror of
https://github.com/restic/restic.git
synced 2025-08-11 12:37:47 +00:00
Make ID.Str() handle nil ids correctly
This commit is contained in:
@@ -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])
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user