Skip to content

Commit

Permalink
Address PR comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhinav Ittekot committed Nov 4, 2022
1 parent 743c23f commit e9bc0c7
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions pkg/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,8 @@ func (c *ScrapeConf) Load(file *string) error {
return nil
}

func (c *ScrapeConf) IsConfigFileEmpty() bool {
if c.Discovery.Jobs == nil && c.Static == nil && c.CustomMetrics == nil {
return true
}
return false
}

func (c *ScrapeConf) Validate() error {
if c.IsConfigFileEmpty() {
if c.Discovery.Jobs == nil && c.Static == nil && c.CustomMetrics == nil {
return fmt.Errorf("At least 1 Discovery job, 1 Static or one CustomMetric must be defined")
}

Expand Down

0 comments on commit e9bc0c7

Please sign in to comment.