git-module

git clone git://git.lin.moe/fork/git-module.git

 1package git
 2
 3// Blame contains information of a Git file blame.
 4type Blame struct {
 5	lines []*Commit
 6}
 7
 8// Line returns the commit by given line number (1-based). It returns nil when
 9// no such line.
10func (b *Blame) Line(i int) *Commit {
11	if i <= 0 || len(b.lines) < i {
12		return nil
13	}
14	return b.lines[i-1]
15}