MCPcopy
hub / github.com/harness/harness / Parser

Struct Parser

git/api/foreachref/parser.go:27–37  ·  view source on GitHub ↗

Parser parses 'git for-each-ref' output according to a given output Format.

Source from the content-addressed store, hash-verified

25
26// Parser parses 'git for-each-ref' output according to a given output Format.
27type 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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected