From b3b3e88d490e2b877a9ef6cef3223389c958a100 Mon Sep 17 00:00:00 2001 From: Sam Sanders Date: Mon, 27 Aug 2018 17:10:10 -0700 Subject: [PATCH] gofmtd pack.go and pack_test.go --- pkg/draft/pack/pack.go | 2 +- pkg/draft/pack/pack_test.go | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/pkg/draft/pack/pack.go b/pkg/draft/pack/pack.go index cfcdd12..46ef5cd 100644 --- a/pkg/draft/pack/pack.go +++ b/pkg/draft/pack/pack.go @@ -41,7 +41,7 @@ const ( TargetTasksFileName = ".draft-tasks.toml" ) -type PackFile struct{ +type PackFile struct { file io.ReadCloser perm os.FileMode } diff --git a/pkg/draft/pack/pack_test.go b/pkg/draft/pack/pack_test.go index 2a2d3bc..42f20da 100644 --- a/pkg/draft/pack/pack_test.go +++ b/pkg/draft/pack/pack_test.go @@ -2,13 +2,13 @@ package pack import ( "bytes" + "fmt" "io/ioutil" + "k8s.io/helm/pkg/proto/hapi/chart" "os" "path/filepath" "testing" - "k8s.io/helm/pkg/proto/hapi/chart" - "fmt" - ) +) const testDockerfile = `FROM nginx:latest ` @@ -32,8 +32,8 @@ func TestSaveDir(t *testing.T) { }, }, Files: map[string]PackFile{ - dockerfileName: PackFile{ioutil.NopCloser(bytes.NewBufferString(testDockerfile)), dockerPerm}, - TasksFileName: PackFile{ioutil.NopCloser(bytes.NewBufferString(testTasksFile)), tasksPerm}, + dockerfileName: {ioutil.NopCloser(bytes.NewBufferString(testDockerfile)), dockerPerm}, + TasksFileName: {ioutil.NopCloser(bytes.NewBufferString(testTasksFile)), tasksPerm}, }, } dir, err := ioutil.TempDir("", "draft-pack-test") @@ -59,7 +59,6 @@ func TestSaveDir(t *testing.T) { t.Fail() } - tasksPath := filepath.Join(dir, TargetTasksFileName) fInfo, err = os.Stat(tasksPath) if err != nil { @@ -91,7 +90,7 @@ func TestSaveDirDockerfileExistsInAppDir(t *testing.T) { }, }, Files: map[string]PackFile{ - dockerfileName: PackFile{ioutil.NopCloser(bytes.NewBufferString(testDockerfile)), 664}, + dockerfileName: {ioutil.NopCloser(bytes.NewBufferString(testDockerfile)), 664}, }, } dir, err := ioutil.TempDir("", "draft-pack-test")