readingHelp represents the state where the last byte read (now in p.currentByte) is the first byte of the docstring after 'HELP'.
()
| 644 | // readingHelp represents the state where the last byte read (now in |
| 645 | // p.currentByte) is the first byte of the docstring after 'HELP'. |
| 646 | func (p *TextParser) readingHelp() stateFn { |
| 647 | if p.currentMF.Help != nil { |
| 648 | p.parseError(fmt.Sprintf("second HELP line for metric name %q", p.currentMF.GetName())) |
| 649 | return nil |
| 650 | } |
| 651 | // Rest of line is the docstring. |
| 652 | if p.readTokenUntilNewline(true); p.err != nil { |
| 653 | return nil // Unexpected end of input. |
| 654 | } |
| 655 | p.currentMF.Help = proto.String(p.currentToken.String()) |
| 656 | return p.startOfLine |
| 657 | } |
| 658 | |
| 659 | // readingType represents the state where the last byte read (now in |
| 660 | // p.currentByte) is the first byte of the type hint after 'HELP'. |
nothing calls this directly
no test coverage detected