aboutsummaryrefslogtreecommitdiff
path: root/Sources/server.swift
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2023-12-09 20:49:26 -0700
committerNavan Chauhan <navanchauhan@gmail.com>2023-12-09 20:49:26 -0700
commit2fab25898415483b49aeadff333dd4e2804288ff (patch)
treea829107dc23e01d84240a566c68504862a1ec6bc /Sources/server.swift
parent6e7efbe9092b9d5b6618a5174166ea96f9989d78 (diff)
fix \t\t
Diffstat (limited to 'Sources/server.swift')
-rw-r--r--Sources/server.swift18
1 files changed, 12 insertions, 6 deletions
diff --git a/Sources/server.swift b/Sources/server.swift
index 44520bb..c8cf97b 100644
--- a/Sources/server.swift
+++ b/Sources/server.swift
@@ -8,12 +8,18 @@ import NIO
@main
struct swiftGopher: ParsableCommand {
- @Option var gopherHostName: String = "localhost"
- @Option var port: Int = 8080
- @Option var gopherDataDir: String = "./example-gopherdata"
- @Option var host: String = "0.0.0.0"
- @Flag var disableSearch: Bool = false
- @Flag var disableGophermap: Bool = false
+ @Option(name: [.short, .long], help: "Hostname used for generating selectors")
+ var gopherHostName: String = "localhost"
+ @Option(name: [.short, .long])
+ var host: String = "0.0.0.0"
+ @Option(name: [.short, .long])
+ var port: Int = 8080
+ @Option(name: [.customShort("d"), .long], help: "Data directory to map")
+ var gopherDataDir: String = "./example-gopherdata"
+ @Flag(help: "Disable full-text search feature")
+ var disableSearch: Bool = false
+ @Flag(help: "Disable reading gophermap files to override automatic generation")
+ var disableGophermap: Bool = false
public mutating func run() throws {
let eventLoopGroup = MultiThreadedEventLoopGroup(