doxy/App/Sources/Options/AppOptions.swift

30 lines
724 B
Swift
Raw Normal View History

2025-02-22 10:21:07 +01:00
import ArgumentParser
import DoxyLibrary
2025-02-22 10:21:07 +01:00
import Logging
extension App {
struct Options: AppArguments, ParsableArguments {
// MARK: Properties
@Option(
name: .shortAndLong,
help: "A hostname to bind the application to. Defaults to `127.0.0.1`."
)
2025-02-22 10:21:07 +01:00
var hostname: String = "127.0.0.1"
@Option(
name: .shortAndLong,
help: "A log level to set the logger service in the application."
)
var logLevel: Logger.Level?
2025-02-22 10:21:07 +01:00
@Option(
name: .shortAndLong,
help: "A port number to bind the application to. Defaults to `8080`."
)
2025-02-22 10:21:07 +01:00
var port: Int = 8080
}
}