Skip to content

Commit

Permalink
Added validators for default values in main config
Browse files Browse the repository at this point in the history
  • Loading branch information
andyone committed Feb 22, 2017
1 parent ee48cce commit f1507dc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,11 @@ func validateConfig() {
{DEFAULTS_RESPAWN_INTERVAL, knf.Empty, nil},
{DEFAULTS_KILL_TIMEOUT, knf.Empty, nil},

{DEFAULTS_NPROC, knf.Less, 0},
{DEFAULTS_NOFILE, knf.Less, 0},
{DEFAULTS_RESPAWN_COUNT, knf.Less, 0},
{DEFAULTS_RESPAWN_INTERVAL, knf.Less, 0},
{DEFAULTS_KILL_TIMEOUT, knf.Less, 0},

{MAIN_RUN_USER, userChecker, nil},
{MAIN_RUN_GROUP, groupChecker, nil},
Expand Down

0 comments on commit f1507dc

Please sign in to comment.