Skip to content

Commit

Permalink
minor version bump, 1.1.0
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Porter <portertech@gmail.com>
  • Loading branch information
portertech committed Dec 10, 2018
1 parent 82f0177 commit 4fc354b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [1.1.0] - 2018-12-10
### Changed
- Validating the number of InfluxDB line segments (" ")
- Fixed linter violations

### Added
- Automated Asset builds with goreleaser and Travis CI

## [1.0.0] - 2018-02-07
### Added
- Exporter basic authentication support (@zsais)
Expand Down
16 changes: 11 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,11 @@ func QueryExporter(exporterURL string, auth ExporterAuth) (model.Vector, error)
}

expResponse, err := client.Do(req)
defer expResponse.Body.Close()

if err != nil {
return nil, err
}
defer expResponse.Body.Close()

if expResponse.StatusCode != http.StatusOK {
return nil, errors.New("exporter returned non OK HTTP response status: " + expResponse.Status)
Expand Down Expand Up @@ -244,13 +244,19 @@ func main() {
}

samples, err = QueryExporter(*exporterURL, auth)

if err != nil {
_ = fmt.Errorf("%v", err)
os.Exit(2)
}

} else {
samples, err = QueryPrometheus(*promURL, *queryString)
}

if err != nil {
_ = fmt.Errorf("%v", err)
os.Exit(2)
if err != nil {
_ = fmt.Errorf("%v", err)
os.Exit(2)
}
}

err = OutputMetrics(samples, *outputFormat, *metricPrefix)
Expand Down

0 comments on commit 4fc354b

Please sign in to comment.