report

package
v46.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 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 added in v46.1.0

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

MarkdownTable describes a table in a markdown document

func NewMarkdownTable added in v46.1.0

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

NewMarkdownTable creates a new table with given alignments and headers

func (*MarkdownTable) AddRow added in v46.1.0

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

AddRow adds a new row to the table

func (*MarkdownTable) Columns added in v46.1.0

func (t *MarkdownTable) Columns() int

Columns returns the number of columns in this table

func (*MarkdownTable) String added in v46.1.0

func (t *MarkdownTable) String() string

String outputs the markdown table to a string

type MarkdownWriter added in v46.1.0

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

MarkdownWriter is a writer to write contents in markdown format

func (*MarkdownWriter) EmptyLine added in v46.1.0

func (md *MarkdownWriter) EmptyLine()

EmptyLine inserts an empty line to the markdown document

func (*MarkdownWriter) String added in v46.1.0

func (md *MarkdownWriter) String() string

String outputs the markdown document as a string

func (*MarkdownWriter) WriteHeader added in v46.1.0

func (md *MarkdownWriter) WriteHeader(h string)

WriteHeader writes a header to the markdown document

func (*MarkdownWriter) WriteLine added in v46.1.0

func (md *MarkdownWriter) WriteLine(s string)

WriteLine writes a line to the markdown document

func (*MarkdownWriter) WriteSubheader added in v46.1.0

func (md *MarkdownWriter) WriteSubheader(sh string)

WriteSubheader writes a sub-header to the markdown document

func (*MarkdownWriter) WriteTable added in v46.1.0

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