Skip to content

Commit

Permalink
Fix CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
fummicc1 committed Dec 17, 2024
1 parent 4c40d63 commit 420c005
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/GeoHashCLI/GeoHashCLI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct GeoHashCLI: ParsableCommand {
)
let precision = GeoHashBitsPrecision.exact(digits: length * 5)

let geoHash: GeoHash
let geoHash: GeoHash?

if let coordinate {
let components = coordinate.split(separator: ",")
Expand All @@ -53,6 +53,6 @@ struct GeoHashCLI: ParsableCommand {
} else {
throw ValidationError("Coordinate or latitude and longitude must be provided.")
}
print(geoHash.geoHash)
print(geoHash?.geoHash ?? "Invalid GeoHash")
}
}
}

0 comments on commit 420c005

Please sign in to comment.