Last active
October 21, 2022 04:56
-
-
Save DavidPiper94/8051c76e04318083467bed9d7bbaa30d to your computer and use it in GitHub Desktop.
Example code for article about ArgumentParser - Input
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1 | |
@Option(name: [.customLong("file")], help: "The file path to write the note to.") | |
var filePath: String | |
// 2 | |
@Argument(help: "The note to write to file.") | |
var note: String | |
// 3 | |
@Flag(name: .shortAndLong, help: "Overrides existing file.") | |
var force = false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment