mirror of
https://github.com/prometheus/prometheus
synced 2024-12-27 17:13:22 +00:00
Merge pull request #13675 from kokes/parser_next_doc
docs: textparse.Parser return type mismatch
This commit is contained in:
commit
c0cbb8082b
@ -71,8 +71,8 @@ type Parser interface {
|
||||
// if the scrape protocol or metric type does not support created timestamps.
|
||||
CreatedTimestamp() *int64
|
||||
|
||||
// Next advances the parser to the next sample. It returns false if no
|
||||
// more samples were read or an error occurred.
|
||||
// Next advances the parser to the next sample.
|
||||
// It returns (EntryInvalid, io.EOF) if no samples were read.
|
||||
Next() (Entry, error)
|
||||
}
|
||||
|
||||
|
@ -239,8 +239,8 @@ func (p *OpenMetricsParser) parseError(exp string, got token) error {
|
||||
return fmt.Errorf("%s, got %q (%q) while parsing: %q", exp, p.l.b[p.l.start:e], got, p.l.b[p.start:e])
|
||||
}
|
||||
|
||||
// Next advances the parser to the next sample. It returns false if no
|
||||
// more samples were read or an error occurred.
|
||||
// Next advances the parser to the next sample.
|
||||
// It returns (EntryInvalid, io.EOF) if no samples were read.
|
||||
func (p *OpenMetricsParser) Next() (Entry, error) {
|
||||
var err error
|
||||
|
||||
|
@ -280,8 +280,8 @@ func (p *PromParser) parseError(exp string, got token) error {
|
||||
return fmt.Errorf("%s, got %q (%q) while parsing: %q", exp, p.l.b[p.l.start:e], got, p.l.b[p.start:e])
|
||||
}
|
||||
|
||||
// Next advances the parser to the next sample. It returns false if no
|
||||
// more samples were read or an error occurred.
|
||||
// Next advances the parser to the next sample.
|
||||
// It returns (EntryInvalid, io.EOF) if no samples were read.
|
||||
func (p *PromParser) Next() (Entry, error) {
|
||||
var err error
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user