Documentation
¶
Overview ¶
Package render writes a commit map as text, JSON, SVG or HTML.
Index ¶
- Constants
- func Age(t int64, now time.Time) string
- func HTML(w io.Writer, r *Report, o HTMLOptions) error
- func JSON(w io.Writer, r *Report) error
- func SVG(w io.Writer, r *Report, o SVGOptions) error
- func Text(w io.Writer, r *Report, o TextOptions) error
- type Filters
- type HTMLOptions
- type Report
- type SVGOptions
- type TextOptions
Constants ¶
View Source
const ( SVGMarker = `class="cm-svg"` HTMLMarker = `<p class="credit">commitmap ` )
Markers identify files commitmap wrote, so a caller can tell its own earlier output from someone else's file before replacing it.
Variables ¶
This section is empty.
Functions ¶
func HTML ¶
func HTML(w io.Writer, r *Report, o HTMLOptions) error
HTML writes a single self-contained page: no external requests, inline SVG diagram, a collapsible tree, light and dark schemes.
Types ¶
type Filters ¶
type Filters struct {
Since string `json:"since,omitempty"`
Until string `json:"until,omitempty"`
Author string `json:"author,omitempty"`
Paths []string `json:"paths,omitempty"`
Min int `json:"min,omitempty"`
Top int `json:"top,omitempty"`
Merges bool `json:"merges"`
IncludeAll bool `json:"include_all"`
}
Filters echoes the options that shaped the report.
type HTMLOptions ¶
HTMLOptions controls the HTML page.
type Report ¶
type Report struct {
Version string
Mode string
Rev string
Label string // header label: branch name or rev
Depth int // 0 means unlimited
Filters Filters
Root *tree.Node
IgnoredChanges int
Merges int // branch mode: merge commits examined
UnparsedMerges int // branch mode: merges whose subject named no branch
}
Report is everything a renderer needs.
Click to show internal directories.
Click to hide internal directories.