diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-01-11 18:14:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-11 18:14:08 +0800 |
commit | b52fde7cf7ce50725830a9d7ddb61e0e8094c7cd (patch) | |
tree | b6b5eb1ac26c2aaef462f48d6f6738d588c44ed4 /vendor/github.com/rcrowley/go-metrics/registry.go | |
parent | 2b4d0b6ff9954de72177980213e7fee0081973d1 (diff) | |
parent | d78f9b834ade0f1ebcf2532bf90d01c85ad50a8e (diff) | |
download | go-tangerine-b52fde7cf7ce50725830a9d7ddb61e0e8094c7cd.tar.gz go-tangerine-b52fde7cf7ce50725830a9d7ddb61e0e8094c7cd.tar.zst go-tangerine-b52fde7cf7ce50725830a9d7ddb61e0e8094c7cd.zip |
Merge pull request #3546 from fjl/deps-update
vendor: update dependencies
Diffstat (limited to 'vendor/github.com/rcrowley/go-metrics/registry.go')
-rw-r--r-- | vendor/github.com/rcrowley/go-metrics/registry.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/github.com/rcrowley/go-metrics/registry.go b/vendor/github.com/rcrowley/go-metrics/registry.go index 9086dcbdd..2bb7a1e7d 100644 --- a/vendor/github.com/rcrowley/go-metrics/registry.go +++ b/vendor/github.com/rcrowley/go-metrics/registry.go @@ -167,9 +167,9 @@ func NewPrefixedChildRegistry(parent Registry, prefix string) Registry { // Call the given function for each registered metric. func (r *PrefixedRegistry) Each(fn func(string, interface{})) { - wrappedFn := func (prefix string) func(string, interface{}) { + wrappedFn := func(prefix string) func(string, interface{}) { return func(name string, iface interface{}) { - if strings.HasPrefix(name,prefix) { + if strings.HasPrefix(name, prefix) { fn(name, iface) } else { return @@ -184,7 +184,7 @@ func (r *PrefixedRegistry) Each(fn func(string, interface{})) { func findPrefix(registry Registry, prefix string) (Registry, string) { switch r := registry.(type) { case *PrefixedRegistry: - return findPrefix(r.underlying, r.prefix + prefix) + return findPrefix(r.underlying, r.prefix+prefix) case *StandardRegistry: return r, prefix } |