mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-18 18:58:32 +02:00
fix linter
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user