report

package
v47.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BreakingChanges

type BreakingChanges struct {
	Consts     map[string]delta.Signature    `json:"consts,omitempty"`
	Funcs      map[string]delta.FuncSig      `json:"funcs,omitempty"`
	Interfaces map[string]delta.InterfaceDef `json:"interfaces,omitempty"`
	Structs    map[string]delta.StructDef    `json:"structs,omitempty"`
	Removed    *delta.Content                `json:"removed,omitempty"`
}

BreakingChanges represents a set of breaking changes.

func (BreakingChanges) IsEmpty

func (bc BreakingChanges) IsEmpty() bool

IsEmpty returns true if there are no breaking changes.

type MarkdownTable

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

MarkdownTable describes a table in a markdown document

func NewMarkdownTable

func NewMarkdownTable(alignment string, headers ...string) *MarkdownTable

NewMarkdownTable creates a new table with given alignments and headers

func (*MarkdownTable) AddRow

func (t *MarkdownTable) AddRow(items ...string)

AddRow adds a new row to the table

func (*MarkdownTable) Columns

func (t *MarkdownTable) Columns() int

Columns returns the number of columns in this table

func (*MarkdownTable) String

func (t *MarkdownTable) String() string

String outputs the markdown table to a string

type MarkdownWriter

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

MarkdownWriter is a writer to write contents in markdown format

func (*MarkdownWriter) EmptyLine

func (md *MarkdownWriter) EmptyLine()

EmptyLine inserts an empty line to the markdown document

func (*MarkdownWriter) String

func (md *MarkdownWriter) String() string

String outputs the markdown document as a string

func (*MarkdownWriter) WriteHeader

func (md *MarkdownWriter) WriteHeader(h string)

WriteHeader writes a header to the markdown document

func (*MarkdownWriter) WriteLine

func (md *MarkdownWriter) WriteLine(s string)

WriteLine writes a line to the markdown document

func (*MarkdownWriter) WriteSubheader

func (md *MarkdownWriter) WriteSubheader(sh string)

WriteSubheader writes a sub-header to the markdown document

func (*MarkdownWriter) WriteTable

func (md *MarkdownWriter) WriteTable(table MarkdownTable)

WriteTable writes a table to the markdown document

type Package

type Package struct {
	AdditiveChanges *delta.Content   `json:"additiveChanges,omitempty"`
	BreakingChanges *BreakingChanges `json:"breakingChanges,omitempty"`
}

Package represents a per-package report that contains additive and breaking changes.

func Generate

func Generate(lhs, rhs exports.Content, onlyBreakingChanges, onlyAdditions bool) Package

Generate generates a package report based on the delta between lhs and rhs. onlyBreakingChanges - pass true to include only breaking changes in the report. onlyAdditions - pass true to include only addition changes in the report.

func (Package) HasAdditiveChanges

func (p Package) HasAdditiveChanges() bool

HasAdditiveChanges returns true if the package report contains additive changes.

func (Package) HasBreakingChanges

func (p Package) HasBreakingChanges() bool

HasBreakingChanges returns true if the package report contains breaking changes.

func (Package) IsEmpty

func (p Package) IsEmpty() bool

IsEmpty returns true if the report contains no data (e.g. no changes in exported types).

func (Package) ToMarkdown

func (p Package) ToMarkdown() string

ToMarkdown creates a report of the package changes in markdown format.

Jump to

Keyboard shortcuts

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