From: Simon Ruderich Date: Sun, 9 May 2021 10:24:12 +0000 (+0200) Subject: sync: tests: use variable to reduce line wrapping X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=6d78cccd689fd81a08851b95a03fea608f497e16;p=safcm%2Fsafcm.git sync: tests: use variable to reduce line wrapping --- 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