lib

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2019 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// HelpMessage is the help text
	HelpMessage = `` /* 1155-byte string literal not displayed */

	// HelpCommand is the command for help
	HelpCommand = "Help"
)
View Source
const (
	// HTMLTemplate is a template for HTML
	HTMLTemplate = `` /* 1250-byte string literal not displayed */

	// Stylesheet is a stylesheet
	Stylesheet = `` /* 5551-byte string literal not displayed */

	// MdTemplate is a markdown template
	MdTemplate = `` /* 848-byte string literal not displayed */

	// MdTemplateRelease is a markdown template for a release
	MdTemplateRelease = `` /* 734-byte string literal not displayed */

	// MdTemplateDescription is a markdown template for a release description
	MdTemplateDescription = `` /* 692-byte string literal not displayed */

)

Variables

View Source
var CommandMapping = map[string]Command{
	"Help":    Help,
	"release": release,
	"to":      transform,
}

CommandMapping maps command names with command functions

View Source
var RegexSuffixes = `SNAPSHOT|ALPHA|BETA|RC|snapshot|alpha|beta|rc`

RegexSuffixes is a regexp for version suffixes

View Source
var RegexpDate = regexp.MustCompile(`^\d\d\d\d-\d\d-\d\d$`)

RegexpDate is a regexp for date

View Source
var RegexpFilename = regexp.MustCompile(`^(?i)change(-|_)?log(.yml|.yaml)?$`)

RegexpFilename is the regular expression for changelog filename

View Source
var RegexpVersion = regexp.MustCompile(`^\d+(\.\d+)*(-(` + RegexSuffixes + `)(-\d+)?)?$`)

RegexpVersion is a regexp for version

Functions

func FindChangelog

func FindChangelog() (string, error)

FindChangelog finds source file and return its name

func Help

func Help(changelog Changelog, args []string) error

Help print help and exit

func IsPiped

func IsPiped() bool

IsPiped tells if content was piped to this process

func ReadChangelog

func ReadChangelog(file string) ([]byte, error)

ReadChangelog reads source file and return contents as array of bytes

func ReadStdin

func ReadStdin() ([]byte, error)

ReadStdin reads standard input and return its content

Types

type Changelog

type Changelog []Release

Changelog is a list of releases

func ParseChangelog

func ParseChangelog(source []byte) (Changelog, error)

ParseChangelog parses source file and return Changelog object

type Command

type Command func(Changelog, []string) error

Command is a changelog command implemented with a function

type Release

type Release struct {
	Version    string
	Date       string
	Summary    string
	Added      []string
	Changed    []string
	Deprecated []string
	Removed    []string
	Fixed      []string
	Security   []string
	Rejected   []string
	Notes      []string
}

Release contains information about a release

type TemplateDataChangelog

type TemplateDataChangelog struct {
	Changelog   Changelog
	Stylesheets []string
}

TemplateDataChangelog contains data for changelog template

Jump to

Keyboard shortcuts

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