You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/_docs/reference/experimental/main-annotation.md
+12-14Lines changed: 12 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,8 +31,8 @@ object foo {
31
31
),
32
32
args = args
33
33
)
34
-
valargs0= cmd.argGetter[Int](0, None) // using cmd.Parser[Int]
35
-
valargs1= cmd.varargGetter[Int] // using cmd.Parser[Int]
34
+
valargs0= cmd.argGetter[Int](0, None) // using a parser of Int
35
+
valargs1= cmd.varargGetter[Int] // using a parser of Int
36
36
cmd.run(() => sum(args0(), args1()*))
37
37
}
38
38
}
@@ -47,17 +47,15 @@ Finally, the `run` method is called to run the application. It receives a by-nam
47
47
Example of implementation of `myMain` that takes all arguments positionally. It used `util.CommandLineParser.FromString` and expects no default arguments. For simplicity, any errors in preprocessing or parsing results in crash.
0 commit comments