Skip to content

Commit 60aff9c

Browse files
author
Matthew Judy
committed
Update template to use a subcommand-style @Argument instead of a dashed @Option for "Part Two" mode switching.
1 parent 614d3b9 commit 60aff9c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Template/ChallengeName.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,15 @@ import Shared
1818
@main
1919
struct <#ChallengeName#>: AsyncParsableCommand
2020
{
21-
// /// Adds a `--mode` option to the command, which allows the command's logic
21+
// /// Adds a "sub-command" argument to the command, which allows the logic
2222
// /// to branch and handle requirements of either "Part One" or "Part Two".
23-
// /// The option must be followed by a value from this enumeration.
23+
// /// The argument must be a value from this enumeration.
2424
// enum Mode: String, ExpressibleByArgument, CaseIterable
2525
// {
2626
// case <#modeA#>
2727
// case <#modeB#>
2828
// }
29-
// @Option(help: "'<#modeA#>' or '<#modeB#>'")
30-
// var mode: Mode
29+
// @Argument var mode: Mode
3130

3231
// /// Adds a flag to the command, named for the behavioral difference in
3332
// /// "Part Two." This allows the command's logic to branch and handle the

0 commit comments

Comments
 (0)