{"modulePath":"github.com/conventionalcommit/commitlint","version":"v0.13.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package commit\n\nPackage commit provides core interfaces for parsed conventional commits. Consumers depend on these interfaces independently of the backing parser.\n\n## Functions\n\n```go\nfunc DiagnosticPosition(msg string, err error) (line, column int, ok bool)\n```\nDiagnosticPosition returns the 1-based line and column for err in msg when err carries a byte offset, or false otherwise.\n\n```go\nfunc FirstLine(msg string) string\n```\nFirstLine returns the first line of msg without its LF or CRLF ending.\n\n```go\nfunc ForEachLine(s string, fn func(line string) bool)\n```\nForEachLine iterates over lines in s without their LF or CRLF endings. Iteration stops if fn returns false.\n\n## Types\n\n```go\ntype Commit interface {\n\tMessage() string\n\tHeader() string\n\tBody() string\n\tFooter() string\n\tType() string\n\tScope() string\n\tDescription() string\n\tNotes() []Note\n\tIsBreakingChange() bool\n\n\tHasHeaderBang() bool\n\tHasBreakingFooter() bool\n\tBodyBlankLines() int\n\tFooterBlankLines() int\n\tNoteCount() int\n\tNoteAt(index int) Note\n}\n```\nCommit represents a parsed conventional commit message.\n\n```go\nfunc Inspect(input string) (Commit, []error)\n```\nInspect exposes recoverable fields alongside all syntax diagnostics. A nil commit means structural recovery was unsafe.\n\n```go\ntype Note interface {\n\tToken() string\n\tValue() string\n}\n```\nNote represents a footer note.\n\n```go\ntype Parser interface {\n\tParse(msg string) (Commit, error)\n}\n```\nParser parses a commit message into a Commit.\n\n```go\nfunc NewParser() Parser\n```\nNewParser returns a stateless parser backed by syntax.\n\n","path":"github.com/conventionalcommit/commitlint/commit","name":"commit","synopsis":"Package commit provides core interfaces for parsed conventional commits.","isRedistributable":true}
