Skip to content

Commit 0df7b91

Browse files
authored
Merge pull request #842 from burgerdev/expfmt
expfmt: document NewTextParser as required
2 parents f595ac6 + 85a216b commit 0df7b91

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

expfmt/text_parse.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ func (e ParseError) Error() string {
4848
return fmt.Sprintf("text format parsing error in line %d: %s", e.Line, e.Msg)
4949
}
5050

51-
// TextParser is used to parse the simple and flat text-based exchange format. Its
52-
// zero value is ready to use.
51+
// TextParser is used to parse the simple and flat text-based exchange format.
52+
//
53+
// TextParser instances must be created with NewTextParser, the zero value of
54+
// TextParser is invalid.
5355
type TextParser struct {
5456
metricFamiliesByName map[string]*dto.MetricFamily
5557
buf *bufio.Reader // Where the parsed input is read through.

0 commit comments

Comments
 (0)