mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
set routing.mode to routing.provider
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user