فهرست منبع

Merge pull request #94 from toffaletti/master

Fix registry race caused by copying a sync.Mutex
Mikhail P 10 سال پیش
والد
کامیت
8ec34181c3
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      json.go

+ 1 - 1
json.go

@@ -8,7 +8,7 @@ import (
 
 // MarshalJSON returns a byte slice containing a JSON representation of all
 // the metrics in the Registry.
-func (r StandardRegistry) MarshalJSON() ([]byte, error) {
+func (r *StandardRegistry) MarshalJSON() ([]byte, error) {
 	data := make(map[string]map[string]interface{})
 	r.Each(func(name string, i interface{}) {
 		values := make(map[string]interface{})