func (s *Ripsrc) Code(ctx context.Context, res chan BlameResult) error {
	defer close(res)
	res2 := make(chan CommitCode)
	done := make(chan bool)
	go func() {
		for r := range res2 {
			for f := range r.Blames {
				res <- f
			}
		}
		done <- true
	}()
	err := s.CodeByCommit(ctx, res2)
	<-done
	if err != nil {
		return err
	}
	return nil
}
Code returns code information using one record per file and commit
package ripsrc
import (
	"context"
	"fmt"
	"time"
	"github.com/pinpt/ripsrc/ripsrc/commitmeta"
	"github.com/pinpt/ripsrc/ripsrc/fileinfo"
	"github.com/pinpt/ripsrc/ripsrc/history3/process"
)
type Commit = commitmeta.Commit
type CommitFile = commitmeta.CommitFile
type BlameResult struct {
	Commit             Commit
	Language           string
	Filename           string
	Lines              []*BlameLine
	Size               int64
	Loc                int64
	Sloc               int64
	Comments           int64
	Blanks             int64
	Complexity         int64
	WeightedComplexity float64
	Skipped            string
	License            *License
	Status             CommitStatus
}
type BlameLine struct {
	Name    string
	Email   string
	Date    time.Time
	Comment bool
	Code    bool
	Blank   bool
	SHA     string
}
type License = fileinfo.License
type CommitStatus = commitmeta.CommitStatus
const (
	GitFileCommitStatusAdded = commitmeta.GitFileCommitStatusAdded
	GitFileCommitStatusModified = commitmeta.GitFileCommitStatusModified
	GitFileCommitStatusRemoved = commitmeta.GitFileCommitStatusRemoved
)