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

Method Notes

commit/parser.go:65–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63}
64
65func (d *defaultCommit) Notes() []Note {
66 count := d.FooterCount()
67 if count == 0 {
68 return nil
69 }
70 // Keep one backing slice for all notes instead of allocating each note.
71 values := make([]defaultNote, count)
72 notes := make([]Note, count)
73 for i := range values {
74 entry := d.FooterAt(i)
75 values[i] = defaultNote{
76 token: entry.Token(),
77 value: entry.Value(),
78 }
79 notes[i] = &values[i]
80 }
81 return notes
82}
83
84type defaultNote struct {
85 token string

Callers

nothing calls this directly

Calls 2

TokenMethod · 0.65
ValueMethod · 0.65

Tested by

no test coverage detected