Skip to content

Commit

Permalink
Set globalMetrics when no error
Browse files Browse the repository at this point in the history
  • Loading branch information
armon committed Aug 23, 2013
1 parent b6c9c96 commit d844597
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 1 deletion.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified metrics.go
100644 → 100755
Empty file.
Empty file modified metrics_test.go
100644 → 100755
Empty file.
Empty file modified sink.go
100644 → 100755
Empty file.
Empty file modified sink_test.go
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion start.go
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func New(conf *Config, sink MetricSink) (*Metrics, error) {
// used globally as well as returning it.
func NewGlobal(conf *Config, sink MetricSink) (*Metrics, error) {
metrics, err := New(conf, sink)
if err != nil {
if err == nil {
globalMetrics = metrics
}
return metrics, err
Expand Down
Empty file modified start_test.go
100644 → 100755
Empty file.
Empty file modified statsite.go
100644 → 100755
Empty file.
Empty file modified statsite_test.go
100644 → 100755
Empty file.

0 comments on commit d844597

Please sign in to comment.