MCPcopy Create free account
hub / github.com/conventionalcommit/commitlint / FirstLine

Function FirstLine

commit/parser.go:93–97  ·  view source on GitHub ↗

FirstLine returns the first line of msg without its LF or CRLF ending.

(msg string)

Source from the content-addressed store, hash-verified

91
92// FirstLine returns the first line of msg without its LF or CRLF ending.
93func FirstLine(msg string) string {
94 it := syntax.Lines(msg)
95 line, _ := it.Next()
96 return msg[line.Content.Start:line.Content.End]
97}
98
99// ForEachLine iterates over lines in s without their LF or CRLF endings.
100// Iteration stops if fn returns false.

Callers 2

isIgnoredMethod · 0.92
TestCommitHelpersFunction · 0.92

Calls

no outgoing calls

Tested by 1

TestCommitHelpersFunction · 0.74