readingHelp represents the state where the last byte read (now in p.currentByte) is the first byte of the docstring after 'HELP'.
()
| 498 | // readingHelp represents the state where the last byte read (now in |
| 499 | // p.currentByte) is the first byte of the docstring after 'HELP'. |
| 500 | func (p *TextParser) readingHelp() stateFn { |
| 501 | if p.currentMF.Help != nil { |
| 502 | p.parseError(fmt.Sprintf("second HELP line for metric name %q", p.currentMF.GetName())) |
| 503 | return nil |
| 504 | } |
| 505 | // Rest of line is the docstring. |
| 506 | if p.readTokenUntilNewline(true); p.err != nil { |
| 507 | return nil // Unexpected end of input. |
| 508 | } |
| 509 | p.currentMF.Help = proto.String(p.currentToken.String()) |
| 510 | return p.startOfLine |
| 511 | } |
| 512 | |
| 513 | // readingType represents the state where the last byte read (now in |
| 514 | // p.currentByte) is the first byte of the type hint after 'HELP'. |
nothing calls this directly
no test coverage detected