fix some lint issues (#1239)

* fix some lint issues

* print error

* unname the unused params
This commit is contained in:
Preston Van Loon
2019-01-05 22:12:59 -05:00
committed by Raul Jordan
parent 493d4df18d
commit aa4f66edeb
2 changed files with 6 additions and 3 deletions

View File

@@ -414,7 +414,7 @@ func ProcessDeposit(
state *pb.BeaconState,
pubkey []byte,
amount uint64,
proofOfPossession []byte,
_ /*proofOfPossession*/ []byte,
withdrawalCredentials []byte,
randaoCommitment []byte,
pocCommitment []byte,

View File

@@ -35,7 +35,7 @@ func NewPrometheusService(addr string, svcRegistry *shared.ServiceRegistry) *Ser
return s
}
func (s *Service) healthzHandler(w http.ResponseWriter, r *http.Request) {
func (s *Service) healthzHandler(w http.ResponseWriter, _ *http.Request) {
// Call all services in the registry.
// if any are not OK, write 500
// print the statuses of all services.
@@ -51,6 +51,7 @@ func (s *Service) healthzHandler(w http.ResponseWriter, r *http.Request) {
hasError = true
status = "ERROR " + v.Error()
}
if _, err := buf.WriteString(fmt.Sprintf("%s: %s\n", k, status)); err != nil {
hasError = true
status = "ERROR " + err.Error()
@@ -65,7 +66,9 @@ func (s *Service) healthzHandler(w http.ResponseWriter, r *http.Request) {
}
// Write http body
w.Write(buf.Bytes())
if _, err := w.Write(buf.Bytes()); err != nil {
log.Errorf("Could not write healthz body %v", err)
}
}
// Start the prometheus service.