Skip to content

Commit

Permalink
print config
Browse files Browse the repository at this point in the history
  • Loading branch information
jrcichra committed Oct 29, 2023
1 parent c421a62 commit e4a26d7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gps_collector/gps_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bytes"
"encoding/json"
"flag"
"fmt"
"log"
"net/http"
"os"
Expand Down Expand Up @@ -31,8 +32,8 @@ type IngestdConfig struct {
}

type Config struct {
GPSDConfig `json:"gpsd"`
IngestdConfig `json:"ingestd"`
GPSDConfig GPSDConfig `json:"gpsd"`
IngestdConfig IngestdConfig `json:"ingestd"`
}

// gps record with hostname metadata
Expand Down Expand Up @@ -178,6 +179,7 @@ func main() {
if err := yaml.Unmarshal(configFile, cfg); err != nil {
panic(err)
}
fmt.Println("config", cfg)

//connect to gps
gps := makeGPS(cfg.GPSDConfig.URL, cfg.GPSDConfig.Port)
Expand Down

0 comments on commit e4a26d7

Please sign in to comment.