Skip to content

Commit

Permalink
skip help and version from validation
Browse files Browse the repository at this point in the history
  • Loading branch information
gmgigi96 committed Feb 10, 2022
1 parent 804dd7b commit 5cc96de
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions eos_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ func init() {
func validate() error {
// TODO (gdelmont): check that ListenAddress is a valid address:port string

// skip all check when either help or version flags are provided
if cmdOptions.Help || cmdOptions.Version {
return nil
}

// EOSInstamce is required
if cmdOptions.EOSInstance == "" {
return errors.New("Specify an EOS instance using the -eos-instance flag")
Expand Down

0 comments on commit 5cc96de

Please sign in to comment.