Skip to content

Commit

Permalink
Make gitserver golint-compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
lhchavez committed Jun 26, 2019
1 parent b3d00e8 commit 06ba01c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func (p *prometheusMetrics) SummaryObserve(name string, value float64) {
}
}

// SetupMetrics sets up the metrics for the gitserver.
func SetupMetrics() (base.Metrics, http.Handler) {
for _, gauge := range gauges {
prometheus.MustRegister(gauge)
Expand Down
8 changes: 4 additions & 4 deletions ziphandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1321,19 +1321,19 @@ func PushZip(
publishedUpdatedRef.From = publishedBranch.Target().String()
publishedBranch.Free()
}
if ref, err := repo.References.Create(
ref, err := repo.References.Create(
publishedUpdatedRef.Name,
masterNewOid,
true,
"",
); err != nil {
)
if err != nil {
return nil, errors.Wrap(
err,
"failed to update the published ref",
)
} else {
ref.Free()
}
ref.Free()
updatedRefs = append(updatedRefs, publishedUpdatedRef)
}
}
Expand Down

0 comments on commit 06ba01c

Please sign in to comment.