From 140a7b44ab1c4b10e181039c2e1429a195df0fcf Mon Sep 17 00:00:00 2001 From: b5 Date: Thu, 5 Mar 2020 15:37:43 -0500 Subject: [PATCH] chore(fmt): run gofmt --- base/friendly/friendly.go | 4 ++-- cmd/diff_test.go | 10 +++++----- logbook/logbook.go | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/base/friendly/friendly.go b/base/friendly/friendly.go index fcc7a5317..f27baf518 100644 --- a/base/friendly/friendly.go +++ b/base/friendly/friendly.go @@ -70,7 +70,7 @@ func DiffDescriptions(deltas []*deepdiff.Delta, stats *deepdiff.Stats) (string, shortTitle = fmt.Sprintf("%s %s", compName, changes.Rows[0]) } else if len(changes.Rows) == 0 && compName == "transform" { // TODO (b5) - this is a hack to make TestSaveTransformWithoutChanges - // in the cmd package pass. We're getting to this stage with 0 rows of + // in the cmd package pass. We're getting to this stage with 0 rows of // changes, which is making msg & title not-empty, which is in turn allowing // a commit b/c it looks like a change. ideally we don't make it here at all, // but we DEFINITELY need a better hueristic for dsfs.CreateDataset's @@ -117,7 +117,7 @@ func DiffDescriptions(deltas []*deepdiff.Delta, stats *deepdiff.Stats) (string, const dtReplace = deepdiff.Operation("replace") -// preprocess makes delta lists easier to work with, by combining operations +// preprocess makes delta lists easier to work with, by combining operations // when possible & removing unwanted paths func preprocess(deltas deepdiff.Deltas, path string) deepdiff.Deltas { build := make([]*deepdiff.Delta, 0, len(deltas)) diff --git a/cmd/diff_test.go b/cmd/diff_test.go index c7b4ca5c3..ff2ef0b44 100644 --- a/cmd/diff_test.go +++ b/cmd/diff_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" + "github.com/google/go-cmp/cmp" "github.com/qri-io/ioes" "github.com/qri-io/qri/base/dsfs" - "github.com/google/go-cmp/cmp" ) func TestDiffComplete(t *testing.T) { @@ -100,19 +100,19 @@ func TestDiffRun(t *testing.T) { if err != nil { t.Fatalf("case %s, error creating dataset request: %s", c.description, err) } - + opt := c.opt opt.IOStreams = streams opt.DatasetRequests = dsr - + if err = opt.Run(); err != nil { t.Fatalf("case %s unexpected error: %s", c.description, err) } - + if diff := cmp.Diff(out.String(), c.stdout); diff != "" { t.Errorf("output mismatch (-want +got):\n%s", diff) } - + ioReset(in, out, errs) }) } diff --git a/logbook/logbook.go b/logbook/logbook.go index 157dd631f..920f64356 100644 --- a/logbook/logbook.go +++ b/logbook/logbook.go @@ -96,7 +96,7 @@ type Book struct { fsLocation string fs qfs.Filesystem - listener func(*Action) + listener func(*Action) } // NewBook creates a book with a user-provided logstore