Skip to content
This repository was archived by the owner on Dec 4, 2024. It is now read-only.

Commit 7b2bb6c

Browse files
committed
Move app extensions closer to method
1 parent d0aae3c commit 7b2bb6c

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

cli/dcos-spark/submit_builder.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@ var keyWhitespaceValPattern = regexp.MustCompile("(.+)\\s+(.+)")
2222
var backslashNewlinePattern = regexp.MustCompile("\\s*\\\\s*\\n\\s+")
2323
var collapseSpacesPattern = regexp.MustCompile(`[\s\p{Zs}]{2,}`)
2424

25-
// AcceptedSparkAppExtensions lists the accepted extensions for Spark application artifacts
26-
var AcceptedSparkAppExtensions = []string{
27-
".jar",
28-
".py",
29-
".R",
30-
}
31-
3225
type sparkVal struct {
3326
flagName string
3427
propName string
@@ -346,8 +339,14 @@ LOOP:
346339
return sparkArgs, appArgs
347340
}
348341

342+
var acceptedSparkAppExtensions = []string{
343+
".jar",
344+
".py",
345+
".R",
346+
}
347+
349348
func isSparkApp(str string) bool {
350-
for _, ext := range AcceptedSparkAppExtensions {
349+
for _, ext := range acceptedSparkAppExtensions {
351350
if strings.HasSuffix(str, ext) {
352351
return true
353352
}

0 commit comments

Comments
 (0)