set routing.mode to routing.provider

This commit is contained in:
Asim Aslam
2021-05-04 11:02:28 +01:00
parent 6fda0401ef
commit 643685f7e9
2 changed files with 3 additions and 3 deletions

View File

@@ -14,6 +14,6 @@ The routing service provides point to point directions
The following config must be set
- **routing.mode**: "google" or "osrm"
- **routing.provider**: "google" or "osrm"
- **routing.address"**: location of osrm api if used
- **google.apikey**: google maps api key if using google

View File

@@ -18,12 +18,12 @@ func main() {
)
// decide whether to use google or osrm
c, err := config.Get("routing.mode")
c, err := config.Get("routing.provider")
if err != nil {
logger.Fatalf("Error loading config: %v", err)
}
// defaults to google
mode := c.String("google")
mode := c.String("")
switch mode {
case "google":