fix linter
This commit is contained in:
		
							parent
							
								
									6b5b88c2bc
								
							
						
					
					
						commit
						230c4c9b07
					
				|  | @ -168,7 +168,7 @@ func cacheFlagsValid() error { | ||||||
| 
 | 
 | ||||||
| // resolveDockerfilePath resolves the Dockerfile path to an absolute path
 | // resolveDockerfilePath resolves the Dockerfile path to an absolute path
 | ||||||
| func resolveDockerfilePath() error { | func resolveDockerfilePath() error { | ||||||
| 	if isUrl(opts.DockerfilePath) { | 	if isURL(opts.DockerfilePath) { | ||||||
| 		return nil | 		return nil | ||||||
| 	} | 	} | ||||||
| 	if util.FilepathExists(opts.DockerfilePath) { | 	if util.FilepathExists(opts.DockerfilePath) { | ||||||
|  | @ -262,7 +262,7 @@ func exit(err error) { | ||||||
| 	os.Exit(1) | 	os.Exit(1) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func isUrl(path string) bool { | func isURL(path string) bool { | ||||||
| 	if match, _ := regexp.MatchString("^https?://", path); match { | 	if match, _ := regexp.MatchString("^https?://", path); match { | ||||||
| 		return true | 		return true | ||||||
| 	} | 	} | ||||||
|  | @ -270,5 +270,5 @@ func isUrl(path string) bool { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func skipPath(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 { | 	for _, tt := range tests { | ||||||
| 		t.Run(tt.description, func(t *testing.T) { | 		t.Run(tt.description, func(t *testing.T) { | ||||||
| 			testutil.CheckDeepEqual(t, tt.expected, isUrl(tt.path)) | 			testutil.CheckDeepEqual(t, tt.expected, isURL(tt.path)) | ||||||
| 		}) | 		}) | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue