fix linter

This commit is contained in:
Tejal Desai
2019-10-04 14:39:53 -07:00
parent 6b5b88c2bc
commit 230c4c9b07
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -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)
}
+1 -1
View File
@@ -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))
})
}
}