internal

package
v0.0.0-...-300ae7d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2017 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Candidate

type Candidate struct {
	Dump   *Dump
	Commit *Commit
}

type Commit

type Commit struct {
	ID          string
	Author      string
	Email       string
	Message     string
	FullMessage string

	// Date is the date when this commit was originally made. (It may
	// differ from the commit date, which is changed during rebases, etc.)
	Date time.Time
}

func Blame

func Blame(repo, file string, line int, revision string) (Commit, error)

Blame returns the commit information about the person that committed the single line in given file in given repository. Heavily influenced by https://github.com/sourcegraph/go-blame/

type Commits

type Commits struct {
	All      []*Commit
	BySource map[string]*Commit
	ByID     map[string]*Commit
}

func DefaultCommits

func DefaultCommits() Commits

func (*Commits) Add

func (cms *Commits) Add(source string, cm Commit)

func (*Commits) SortByDate

func (cms *Commits) SortByDate()

type Dump

type Dump struct {
	Revision string
	Buckets  stack.Buckets
	Commits  Commits
	Skipped  string
	// contains filtered or unexported fields
}

type Format

type Format struct {
	CommitURL     string `yaml:"commit_url,omitempty"`
	FileURL       string `yaml:"file_url,omitempty"`
	BlameURL      string `yaml:"blame_url,omitempty"`
	CustomMessage string `yaml:"custom_message,omitempty"`

	FullPath bool `yaml:"full_path,omitempty"`

	Colors Palette `yaml:"colors,omitempty"`
	// contains filtered or unexported fields
}

func (*Format) BucketHeader

func (f *Format) BucketHeader(bucket *stack.Bucket, multipleBuckets bool) string

BucketHeader prints the header of a goroutine signature.

func (*Format) Commit

func (f *Format) Commit(c *Commit) string

func (*Format) Commits

func (f *Format) Commits(c []*Commit) []string

func (*Format) Init

func (f *Format) Init() error

func (*Format) Message

func (f *Format) Message(c Candidate) string

func (*Format) StackLines

func (f *Format) StackLines(head string, signature *stack.Signature,
	commits *Commits, srcLen int) ([]string, []SourcePath)

StackLines prints one complete stack trace, without the header.

func (*Format) Stacktrace

func (f *Format) Stacktrace(d Dump) ([]string, []SourcePath)

func (*Format) StacktraceForMessage

func (f *Format) StacktraceForMessage(d Dump) string

type Palette

type Palette struct {
	FunctionStdLib         string `yaml:"function_std_lib,omitempty"`
	FunctionStdLibExported string `yaml:"function_std_lib_exported,omitempty"`
	FunctionMain           string `yaml:"function_main,omitempty"`
	FunctionOther          string `yaml:"function_other,omitempty"`
	FunctionOtherExported  string `yaml:"function_other_exported,omitempty"`

	Routine      string `yaml:"routine,omitempty"`
	RoutineFirst string `yaml:"routine_first,omitempty"`

	Package    string `yaml:"package,omitempty"`
	SourceFile string `yaml:"source_file,omitempty"`
	Arguments  string `yaml:"arguments,omitempty"`

	CommitID   string `yaml:"commit_id,omitempty"`
	CommitDate string `yaml:"commit_date,omitempty"`
}

func DefaultPalette

func DefaultPalette() Palette

type Source

type Source struct {
	Repository string `yaml:"repository,omitempty"`
	Revision   string `yaml:"revision,omitempty"`
}

func (*Source) ParseDump

func (s *Source) ParseDump(message io.Reader) (Dump, error)

type SourcePath

type SourcePath struct {
	Head     string
	File     string
	Line     int
	CommitID string
}

type UI

type UI struct {
	// contains filtered or unexported fields
}

func (*UI) Close

func (ui *UI) Close()

func (*UI) Init

func (ui *UI) Init(f *Format) error

func (*UI) Loop

func (ui *UI) Loop()

func (*UI) RenderDump

func (ui *UI) RenderDump(dump Dump)

func (*UI) SetHeight

func (ui *UI) SetHeight(h int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL