From 230c4c9b07fc1916bea7c8423f41cbed75c948ac Mon Sep 17 00:00:00 2001 From: Tejal Desai Date: Fri, 4 Oct 2019 14:39:53 -0700 Subject: [PATCH] fix linter --- cmd/executor/cmd/root.go | 6 +++--- cmd/executor/cmd/root_test.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/executor/cmd/root.go b/cmd/executor/cmd/root.go index 344b79844..53c3eeadc 100644 --- a/cmd/executor/cmd/root.go +++ b/cmd/executor/cmd/root.go @@ -168,7 +168,7 @@ func cacheFlagsValid() error { // resolveDockerfilePath resolves the Dockerfile path to an absolute path func resolveDockerfilePath() error { - if isUrl(opts.DockerfilePath) { + if isURL(opts.DockerfilePath) { return nil } if util.FilepathExists(opts.DockerfilePath) { @@ -262,7 +262,7 @@ func exit(err error) { os.Exit(1) } -func isUrl(path string) bool { +func isURL(path string) bool { if match, _ := regexp.MatchString("^https?://", path); match { return true } @@ -270,5 +270,5 @@ func isUrl(path string) bool { } func skipPath(path string) bool { - return path == "" || isUrl(path) || filepath.IsAbs(path) + return path == "" || isURL(path) || filepath.IsAbs(path) } diff --git a/cmd/executor/cmd/root_test.go b/cmd/executor/cmd/root_test.go index ee629cffe..e760c1f06 100644 --- a/cmd/executor/cmd/root_test.go +++ b/cmd/executor/cmd/root_test.go @@ -93,7 +93,7 @@ func TestIsUrl(t *testing.T) { for _, tt := range tests { t.Run(tt.description, func(t *testing.T) { - testutil.CheckDeepEqual(t, tt.expected, isUrl(tt.path)) + testutil.CheckDeepEqual(t, tt.expected, isURL(tt.path)) }) } }