aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2020-07-06 01:52:08 +0200
committerGitHub <noreply@github.com>2020-07-06 01:52:08 +0200
commita9899594dfdde8bbfdf35fc7e8c2fc3ec5aa7fdb (patch)
treee7b28b456ef3ed90eafc026b506786bea5df179e /utils
parent9ac753f4afb36feb1a1c22214c16e853db54aa00 (diff)
parentf9cf9a99fd51bff8e002900a3a73d117ba54c887 (diff)
downloadgo-git-a9899594dfdde8bbfdf35fc7e8c2fc3ec5aa7fdb.tar.gz
Merge pull request #117 from cristaloleg/fix-goreportcard
fix goreportcard warnings
Diffstat (limited to 'utils')
-rw-r--r--utils/binary/read_test.go3
-rw-r--r--utils/diff/diff.go2
-rw-r--r--utils/merkletrie/filesystem/node_test.go7
-rw-r--r--utils/merkletrie/index/node_test.go3
4 files changed, 9 insertions, 6 deletions
diff --git a/utils/binary/read_test.go b/utils/binary/read_test.go
index 3749258..bcd9dee 100644
--- a/utils/binary/read_test.go
+++ b/utils/binary/read_test.go
@@ -6,8 +6,9 @@ import (
"encoding/binary"
"testing"
- . "gopkg.in/check.v1"
"github.com/go-git/go-git/v5/plumbing"
+
+ . "gopkg.in/check.v1"
)
func Test(t *testing.T) { TestingT(t) }
diff --git a/utils/diff/diff.go b/utils/diff/diff.go
index 6142ed0..7005494 100644
--- a/utils/diff/diff.go
+++ b/utils/diff/diff.go
@@ -29,7 +29,7 @@ func Do(src, dst string) (diffs []diffmatchpatch.Diff) {
// a bulk delete+insert and the half-baked suboptimal result is returned at once.
// The underlying algorithm is Meyers, its complexity is O(N*d) where N is
// min(lines(src), lines(dst)) and d is the size of the diff.
-func DoWithTimeout (src, dst string, timeout time.Duration) (diffs []diffmatchpatch.Diff) {
+func DoWithTimeout(src, dst string, timeout time.Duration) (diffs []diffmatchpatch.Diff) {
dmp := diffmatchpatch.New()
dmp.DiffTimeout = timeout
wSrc, wDst, warray := dmp.DiffLinesToRunes(src, dst)
diff --git a/utils/merkletrie/filesystem/node_test.go b/utils/merkletrie/filesystem/node_test.go
index 0f6ebe0..159e63d 100644
--- a/utils/merkletrie/filesystem/node_test.go
+++ b/utils/merkletrie/filesystem/node_test.go
@@ -7,12 +7,13 @@ import (
"path"
"testing"
- "github.com/go-git/go-billy/v5"
- "github.com/go-git/go-billy/v5/memfs"
- . "gopkg.in/check.v1"
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/utils/merkletrie"
"github.com/go-git/go-git/v5/utils/merkletrie/noder"
+
+ "github.com/go-git/go-billy/v5"
+ "github.com/go-git/go-billy/v5/memfs"
+ . "gopkg.in/check.v1"
)
func Test(t *testing.T) { TestingT(t) }
diff --git a/utils/merkletrie/index/node_test.go b/utils/merkletrie/index/node_test.go
index 4fa6c63..cc5600d 100644
--- a/utils/merkletrie/index/node_test.go
+++ b/utils/merkletrie/index/node_test.go
@@ -5,11 +5,12 @@ import (
"path/filepath"
"testing"
- . "gopkg.in/check.v1"
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/format/index"
"github.com/go-git/go-git/v5/utils/merkletrie"
"github.com/go-git/go-git/v5/utils/merkletrie/noder"
+
+ . "gopkg.in/check.v1"
)
func Test(t *testing.T) { TestingT(t) }