Parser parses 'git for-each-ref' output according to a given output Format.
| 25 | |
| 26 | // Parser parses 'git for-each-ref' output according to a given output Format. |
| 27 | type Parser struct { |
| 28 | // tokenizes 'git for-each-ref' output into "reference paragraphs". |
| 29 | scanner *bufio.Scanner |
| 30 | |
| 31 | // format represents the '--format' string that describes the expected |
| 32 | // 'git for-each-ref' output structure. |
| 33 | format Format |
| 34 | |
| 35 | // err holds the last encountered error during parsing. |
| 36 | err error |
| 37 | } |
| 38 | |
| 39 | // NewParser creates a 'git for-each-ref' output parser that will parse all |
| 40 | // references in the provided Reader. The references in the output are assumed |
nothing calls this directly
no outgoing calls
no test coverage detected