From 728e97700f1bdf7abdcf5dd8aee787dcb3987cff Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Wed, 20 May 2020 12:58:49 +0200 Subject: [PATCH] zfs: fix error message formatting for send args validation --- zfs/zfs.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zfs/zfs.go b/zfs/zfs.go index fc8acc7..1b99a0f 100644 --- a/zfs/zfs.go +++ b/zfs/zfs.go @@ -727,13 +727,13 @@ func (a ZFSSendArgsUnvalidated) validateCorrespondsToResumeToken(ctx context.Con if (a.From != nil) != t.HasFromGUID { // existence must be same if t.HasFromGUID { - return gen.fmt("resume token not expected to be incremental, but `fromguid` = %q", t.FromGUID) + return gen.fmt("resume token not expected to be incremental, but `fromguid` = %v", t.FromGUID) } else { return gen.fmt("resume token expected to be incremental, but `fromguid` not present") } } else if t.HasFromGUID { // if exists (which is same, we checked above), they must match if t.FromGUID != a.From.GUID { - return gen.fmt("resume token `fromguid` != expected: %q != %q", t.FromGUID, a.From.GUID) + return gen.fmt("resume token `fromguid` != expected: %v != %v", t.FromGUID, a.From.GUID) } } else { _ = struct{}{} // both empty, ok @@ -744,7 +744,7 @@ func (a ZFSSendArgsUnvalidated) validateCorrespondsToResumeToken(ctx context.Con return gen.fmt("resume token does not have `toguid`") } if t.ToGUID != a.To.GUID { // a.To != nil because Validate checks for that - return gen.fmt("resume token `toguid` != expected: %q != %q", t.ToGUID, a.To.GUID) + return gen.fmt("resume token `toguid` != expected: %v != %v", t.ToGUID, a.To.GUID) } if a.Encrypted.B {