@@ -13,11 +13,11 @@ object UrlApp extends App {
13
13
)
14
14
15
15
val parser = new scopt.OptionParser [Options ](" scopt" ) {
16
- opt[Boolean ](" assumeFile" ) action { (f, c) =>
16
+ opt[Boolean ](" assumeFile" ). action { (f, c) =>
17
17
c.copy(assumeFile = f)
18
18
} text (" Assumes that the object in the datastore is a file." )
19
19
20
- opt[Boolean ](" assumeDirectory" ) action { (d, c) =>
20
+ opt[Boolean ](" assumeDirectory" ). action { (d, c) =>
21
21
c.copy(assumeDirectory = d)
22
22
} text (" Assumes that the object in the datastore is a directory." )
23
23
@@ -34,27 +34,27 @@ object UrlApp extends App {
34
34
" whether the object in the datastore is a file or a directory."
35
35
)
36
36
37
- opt[String ]('g' , " group" ) required () action { (g, c) =>
37
+ opt[String ]('g' , " group" ). required(). action { (g, c) =>
38
38
c.copy(group = g)
39
39
} text (" Group name of the object in the datastore" )
40
40
41
- opt[String ]('n' , " name" ) required () action { (n, c) =>
41
+ opt[String ]('n' , " name" ). required(). action { (n, c) =>
42
42
c.copy(name = n)
43
43
} text (" Name of the object in the datastore" )
44
44
45
- opt[Int ]('v' , " version" ) required () action { (v, c) =>
45
+ opt[Int ]('v' , " version" ). required(). action { (v, c) =>
46
46
c.copy(version = v)
47
47
} text (" Version number of the object in the datastore" )
48
48
49
- opt[String ]('d' , " datastore" ) action { (d, c) =>
49
+ opt[String ]('d' , " datastore" ). action { (d, c) =>
50
50
c.copy(datastore = Some (Datastore (d)))
51
51
} text (s " Datastore to use. Default is ${Datastore .defaultName}" )
52
52
53
53
help(" help" )
54
54
}
55
55
56
56
Common .handleDatastoreExceptions {
57
- parser.parse(args, Options ()) foreach { config =>
57
+ parser.parse(args, Options ()). foreach { config =>
58
58
val datastore = config.datastore.getOrElse {
59
59
Common .printDefaultDatastoreWarning()
60
60
Datastore
0 commit comments