Validate configuration after loading

Review Request #10006 — Created June 7, 2018 and submitted

brennie
rb-gateway
master
9999
94943fd...
rb-gateway

We now validate the parsed config.json and check for any omitted
fields. Go doesn't let us error on a missing field during
json.Unmarshall so we have to check for its 0 value (e.g., "" for
strings). We now return an error if any required field is missing. In
the case of a missing Port field, we default to 8888 and log a warning
message.

Additionally, all files specfied in config.json are resolve relative
to the path of the config file unless they are absolute paths.

Testing done:
Ran go fmt ./....
Ran go test ./....

brennie
brennie
brennie
brennie
david
  1. Ship It!
  2. 
      
brennie
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (910ac1e)
Loading...