mirror of
https://github.com/tendermint/tendermint.git
synced 2026-02-04 02:52:07 +00:00
comment fixup
This commit is contained in:
@@ -251,8 +251,11 @@ func findMetricsStruct(files map[string]*ast.File, structName string) (*ast.Stru
|
||||
func parseMetricField(f *ast.Field) ParsedMetricField {
|
||||
var comment string
|
||||
if f.Doc != nil {
|
||||
for _, c := range f.Doc.List {
|
||||
for i, c := range f.Doc.List {
|
||||
comment += strings.TrimPrefix(c.Text, "// ")
|
||||
if i < len(f.Doc.List)-1 {
|
||||
comment += " "
|
||||
}
|
||||
}
|
||||
}
|
||||
pmf := ParsedMetricField{
|
||||
|
||||
@@ -18,7 +18,7 @@ func PrometheusMetrics(namespace string, labelsAndValues ...string) *Metrics {
|
||||
Namespace: namespace,
|
||||
Subsystem: MetricsSubsystem,
|
||||
Name: "field",
|
||||
Help: "Height of the chain.We expect multi-line comments to parse correctly.",
|
||||
Help: "Height of the chain. We expect multi-line comments to parse correctly.",
|
||||
}, labels).With(labelsAndValues...),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user