Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Format ¶
type Format struct {
// contains filtered or unexported fields
}
Format supports specifying and parsing an output format for 'git for-each-ref'. See See git-for-each-ref(1) for available fields.
func NewFormat ¶
NewFormat creates a forEachRefFormat using the specified fieldNames. See git-for-each-ref(1) for available fields.
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser parses 'git for-each-ref' output according to a given output Format.
func NewParser ¶
NewParser creates a 'git for-each-ref' output parser that will parse all references in the provided Reader. The references in the output are assumed to follow the specified Format.
func (*Parser) Next ¶
Next returns the next reference as a collection of key-value pairs. nil denotes EOF but is also returned on errors. The Err method should always be consulted after Next returning nil.
It could, for example return something like:
{ "objecttype": "tag", "refname:short": "v1.16.4", "object": "f460b7543ed500e49c133c2cd85c8c55ee9dbe27" }