"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "vendor/github.com/prometheus/client_golang/prometheus/registry.go" between
gitea-1.9.3.tar.gz and gitea-1.9.4.tar.gz

About: Gitea allows to set up a self-hosted code hosting Git service (a fork of Gogs).

registry.go  (gitea-1.9.3):registry.go  (gitea-1.9.4)
skipping to change at line 328 skipping to change at line 328
newDimHashesByName[desc.fqName] = desc.dimHash newDimHashesByName[desc.fqName] = desc.dimHash
} }
} }
} }
// A Collector yielding no Desc at all is considered unchecked. // A Collector yielding no Desc at all is considered unchecked.
if len(newDescIDs) == 0 { if len(newDescIDs) == 0 {
r.uncheckedCollectors = append(r.uncheckedCollectors, c) r.uncheckedCollectors = append(r.uncheckedCollectors, c)
return nil return nil
} }
if existing, exists := r.collectorsByID[collectorID]; exists { if existing, exists := r.collectorsByID[collectorID]; exists {
return AlreadyRegisteredError{ switch e := existing.(type) {
ExistingCollector: existing, case *wrappingCollector:
NewCollector: c, return AlreadyRegisteredError{
ExistingCollector: e.unwrapRecursively(),
NewCollector: c,
}
default:
return AlreadyRegisteredError{
ExistingCollector: e,
NewCollector: c,
}
} }
} }
// If the collectorID is new, but at least one of the descs existed // If the collectorID is new, but at least one of the descs existed
// before, we are in trouble. // before, we are in trouble.
if duplicateDescErr != nil { if duplicateDescErr != nil {
return duplicateDescErr return duplicateDescErr
} }
// Only after all tests have passed, actually register. // Only after all tests have passed, actually register.
r.collectorsByID[collectorID] = c r.collectorsByID[collectorID] = c
 End of changes. 1 change blocks. 
3 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)