Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #32

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ We're much more likely to approve your changes if you:
* Write a [good commit message][commit-message].
* Maintain backward compatibility.

[fork]: https://github.com/uber-go/zap/fork
[fork]: https://github.com/voi-oss/svc/fork
[open-issue]: https://github.com/voi-oss/svc/issues/new
[commit-message]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
10 changes: 5 additions & 5 deletions svc.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ type SVC struct {

gatherers prometheus.Gatherers
internalRegister *prometheus.Registry
promHander http.Handler
promHandler http.Handler
}

// New instantiates a new service by parsing configuration and initializing a
Expand Down Expand Up @@ -104,7 +104,7 @@ func (s *SVC) AddWorker(name string, w Worker) {
}

func (s *SVC) AddGatherer(gatherer prometheus.Gatherer) {
s.promHander = nil
s.promHandler = nil
s.gatherers = append(s.gatherers, gatherer)
}

Expand Down Expand Up @@ -241,8 +241,8 @@ func (s *SVC) recoverWait(name string, wg *sync.WaitGroup, errors chan<- error)
}

func (s *SVC) metricsHandler(w http.ResponseWriter, r *http.Request) {
if s.promHander == nil {
s.promHander = promhttp.HandlerFor(s.gatherers, promhttp.HandlerOpts{})
if s.promHandler == nil {
s.promHandler = promhttp.HandlerFor(s.gatherers, promhttp.HandlerOpts{})
}
s.promHander.ServeHTTP(w, r)
s.promHandler.ServeHTTP(w, r)
}