Involved Source Files
Package revision extracts git revision from string
More information about revision : https://www.kernel.org/pub/software/scm/git/docs/gitrevisions.html
scanner.gotoken.go
Package-Level Type Names (total 19, in which 16 are exported)
ErrInvalidRevision is emitted if string doesn't match valid revision
sstring(*T) Error() string
*T : error
Parser represents a parser
use to tokenize and transform to revisioner chunks
a given string
currentParsedCharstruct{tok token; lit string}s*scannerunreadLastCharbool
Parse explode a revision string into revisioner chunks
checkRefFormat ensure reference name follow rules defined here :
https://git-scm.com/docs/git-check-ref-format
parseAt extract @ statements
parseCaret extract ^ statements
parseCaretBraces extract ^{<data>} statements
parseColon extract : statements
parseColonDefault extract :<data> statements
parseColonSlash extract :/<data> statements
parseRef extract reference name
parseTilde extract ~ statements
scan returns the next token from the underlying scanner
or the last scanned token if an unscan was requested
unscan pushes the previously read token back onto the buffer.
validateFullRevision ensures all revisioner chunks make a valid revision
func NewParser(r io.Reader) *Parser
func NewParserFromString(s string) *Parser
scanner represents a lexical scanner.
r*bufio.Reader
Scan extracts tokens and their strings counterpart
from the reader
func newScanner(r io.Reader) *scanner
The pages are generated with Goldsv0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.