Account lookup failures, account and client limits, options reload.

Changed account lookup and validation failures to be more understandable by users.
Changed limits to be -1 for unlimited to match jwt pkg.

The limits changed exposed problems with options holding real objects causing issues with reload tests under race mode.
Longer term this code should be reworked such that options only hold config data, not real structs, etc.

Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
Derek Collison
2018-12-05 14:18:08 -08:00
parent 5d86964653
commit 2d54fc3ee7
28 changed files with 359 additions and 208 deletions

View File

@@ -87,7 +87,7 @@ func ParseFile(fp string) (map[string]interface{}, error) {
func ParseFileWithChecks(fp string) (map[string]interface{}, error) {
data, err := ioutil.ReadFile(fp)
if err != nil {
return nil, fmt.Errorf("error opening config file: %v", err)
return nil, err
}
p, err := parse(string(data), fp, true)