cmd

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RootCmd added in v1.12.0

func RootCmd() *cobra.Command

rootCmd represents the base command when called without any subcommands

Types

type Batch added in v1.13.0

type Batch struct {
	*cobra.Command

	// CLI args
	OldHeaderPath     string // deprecated but still supported until 2.0
	VersionHeaderPath string
	VersionFooterPath string
	KeepFragments     bool
	RemovePrereleases bool
	Project           string
	MoveDir           string
	IncludeDirs       []string
	DryRun            bool
	Prerelease        []string
	Meta              []string
	Force             bool

	// Dependencies
	TimeNow       core.TimeNow
	TemplateCache *core.TemplateCache
	// contains filtered or unexported fields
}

func NewBatch added in v1.13.0

func NewBatch(
	timeNow core.TimeNow,
	templateCache *core.TemplateCache,
) *Batch

func (*Batch) ClearUnreleased added in v1.13.0

func (b *Batch) ClearUnreleased(changes []core.Change, otherFiles ...string) error

func (*Batch) Run added in v1.13.0

func (b *Batch) Run(cmd *cobra.Command, args []string) error

func (*Batch) WriteChanges added in v1.13.0

func (b *Batch) WriteChanges(changes []core.Change) error

func (*Batch) WriteTemplate added in v1.13.0

func (b *Batch) WriteTemplate(
	template string,
	beforeNewlines int,
	afterNewlines int,
	templateData any,
) error

func (*Batch) WriteTemplateFile added in v1.13.0

func (b *Batch) WriteTemplateFile(
	relativePath string,
	beforeNewlines int,
	afterNewlines int,
	templateData any,
) error

type CoreTypes added in v1.8.0

type CoreTypes map[string]*godoc.Type

type FieldProps added in v1.8.0

type FieldProps struct {
	Name             string
	TypeName         string
	Doc              string
	File             string
	Line             int
	Key              string
	MapKeyTypeName   string
	MapValueTypeName string
	ExampleLang      string
	ExampleContent   string
	TemplateType     string
	IsCustomType     bool
	Required         bool
	Slice            bool
}

type Gen added in v1.13.0

type Gen struct {
	*cobra.Command
}

func NewGen added in v1.13.0

func NewGen() *Gen

func (*Gen) Run added in v1.13.0

func (g *Gen) Run(cmd *cobra.Command, args []string) error

type Init added in v1.13.0

type Init struct {
	*cobra.Command

	// CLI args
	ChangesDir    string
	ChangelogPath string
	Force         bool
}

func NewInit added in v1.13.0

func NewInit() *Init

func (*Init) Run added in v1.13.0

func (i *Init) Run(cmd *cobra.Command, args []string) error

type Latest added in v1.13.0

type Latest struct {
	*cobra.Command

	// CLI args
	RemovePrefix    bool
	SkipPrereleases bool
	Project         string
}

func NewLatest added in v1.13.0

func NewLatest() *Latest

func (*Latest) Run added in v1.13.0

func (l *Latest) Run(cmd *cobra.Command, args []string) error

type Merge added in v1.13.0

type Merge struct {
	*cobra.Command

	// cli args
	DryRun           bool
	UnreleasedHeader string

	// dependencies
	TemplateCache *core.TemplateCache
}

func NewMerge added in v1.13.0

func NewMerge(templateCache *core.TemplateCache) *Merge

func (*Merge) Run added in v1.13.0

func (m *Merge) Run(cmd *cobra.Command, args []string) error

type New added in v1.13.0

type New struct {
	*cobra.Command

	// cli args
	DryRun     bool
	Projects   []string
	Component  string
	Kind       string
	Body       string
	BodyEditor bool
	Custom     []string

	// dependencies
	TimeNow       core.TimeNow
	TemplateCache *core.TemplateCache
}

func NewNew added in v1.13.0

func NewNew(
	timeNow core.TimeNow,
	templateCache *core.TemplateCache,
) *New

func (*New) Run added in v1.13.0

func (n *New) Run(cmd *cobra.Command, args []string) error

type Next added in v1.12.0

type Next struct {
	*cobra.Command

	// cli args
	IncludeDirs []string
	Prerelease  []string
	Meta        []string
	Project     string
}

func NewNext added in v1.12.0

func NewNext() *Next

func (*Next) Run added in v1.12.0

func (n *Next) Run(cmd *cobra.Command, args []string) error

type TypeProps added in v1.8.0

type TypeProps struct {
	Name           string
	Doc            string
	File           string
	Line           int
	ExampleLang    string
	ExampleContent string
	Fields         []FieldProps
}

Jump to

Keyboard shortcuts

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