From 78f02465e29fe0a42cd307f3f543de2ed52993d6 Mon Sep 17 00:00:00 2001 From: William Murphy Date: Mon, 4 Jun 2018 22:10:39 -0400 Subject: [PATCH] Small clean ups (#5) * Fix two small compiler errors Apparently, in go, `fmt.Prntln("\n")` is a build error - you can't have a redundant newline there. Also, we had the wrong format string somewhere. * Use $GOPATH to find dep When I first pulled this branch, all the tests failed because, although `dep` was being installed to my local machine, it wasn't being added to $PATH. Rather than mess with $PATH, I decided to add $GOPATH/bin to the beginning of the invocation. --- Makefile | 4 ++-- filetree/node_test.go | 2 +- image/image.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 796f6da..4eeab1a 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ install: deps deps: command -v dep >/dev/null || go get -u github.com/golang/dep/cmd/dep - dep ensure + $(GOPATH)/bin/dep ensure test: build @! git grep tcell -- ':!tui/' ':!Gopkg.lock' ':!Gopkg.toml' ':!Makefile' @@ -31,4 +31,4 @@ clean: rm -rf vendor go clean -.PHONY: build install deps test lint lintdeps clean \ No newline at end of file +.PHONY: build install deps test lint lintdeps clean diff --git a/filetree/node_test.go b/filetree/node_test.go index 17fa86b..03a262d 100644 --- a/filetree/node_test.go +++ b/filetree/node_test.go @@ -43,7 +43,7 @@ func TestAddChild(t *testing.T) { } if *two.Data != *new(FileChangeInfo) { - t.Errorf("Expected 'twos' payload to be nil got %d.", two.Data) + t.Errorf("Expected 'twos' payload to be nil got %+v.", two.Data) } } diff --git a/image/image.go b/image/image.go index e49a4f4..76617a1 100644 --- a/image/image.go +++ b/image/image.go @@ -92,7 +92,7 @@ func WriteImage() { fmt.Printf("Image: %s\nId: %s\nParent: %s\nLayers: %d\n%sHistory: %s\n", imageID, inspect.ID, inspect.Parent, len(inspect.RootFS.Layers), layerStr, historyStr) - fmt.Println("\n") + fmt.Println("") if inspect.Parent == "" { break