Browse Source

Return interfaces from NewRegistry, too.

Richard Crowley 12 years ago
parent
commit
b0ed6106fb
1 changed files with 2 additions and 2 deletions
  1. 2 2
      registry.go

+ 2 - 2
registry.go

@@ -36,7 +36,7 @@ type StandardRegistry struct {
 var _ Registry = &StandardRegistry{}
 
 // Create a new registry.
-func NewRegistry() *StandardRegistry {
+func NewRegistry() Registry {
 	return &StandardRegistry{metrics: make(map[string]interface{})}
 }
 
@@ -92,7 +92,7 @@ func (r *StandardRegistry) registered() map[string]interface{} {
 	return metrics
 }
 
-var DefaultRegistry *StandardRegistry = NewRegistry()
+var DefaultRegistry Registry = NewRegistry()
 
 // Call the given function for each registered metric.
 func Each(f func(string, interface{})) {