From 6d78cccd689fd81a08851b95a03fea608f497e16 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 9 May 2021 12:24:12 +0200 Subject: [PATCH] sync: tests: use variable to reduce line wrapping --- cmd/safcm-remote/sync/sync_test.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cmd/safcm-remote/sync/sync_test.go b/cmd/safcm-remote/sync/sync_test.go index 6f8025a..52d7435 100644 --- a/cmd/safcm-remote/sync/sync_test.go +++ b/cmd/safcm-remote/sync/sync_test.go @@ -80,10 +80,8 @@ func (r *testRunner) check(method string, cmd *exec.Cmd) ( exp := r.expCmds[0] r.expCmds = r.expCmds[1:] if !reflect.DeepEqual(exp, cmd) { - r.t.Errorf("%s: %s", method, - cmp.Diff(exp, cmd, cmpopts.IgnoreUnexported( - exec.Cmd{}, - bytes.Buffer{}))) + opts := cmpopts.IgnoreUnexported(exec.Cmd{}, bytes.Buffer{}) + r.t.Errorf("%s: %s", method, cmp.Diff(exp, cmd, opts)) } var stdout, stderr []byte -- 2.45.2