branch

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = &cobra.Command{
	Use:   "branch",
	Short: "Manage branches",
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Branch requires a subcommand:")
		for _, command := range cmd.Commands() {
			fmt.Println(command.Name())
		}
	},
}

Command represents this folder's command

Functions

This section is empty.

Types

type Branch

type Branch struct {
	Type                 string        `json:"type"                             mapstructure:"type"`
	Name                 string        `json:"name"                             mapstructure:"name"`
	Target               commit.Commit `json:"target"                           mapstructure:"target"`
	Links                common.Links  `json:"links"                            mapstructure:"links"`
	MergeStrategies      []string      `json:"merge_strategies,omitempty"       mapstructure:"merge_strategies"`
	DefaultMergeStrategy string        `json:"default_merge_strategy,omitempty" mapstructure:"default_merge_strategy"`
}

func (Branch) GetHeader added in v0.4.0

func (branch Branch) GetHeader(short bool) []string

GetHeader gets the header for a table

implements common.Tableable

func (Branch) GetRow added in v0.4.0

func (branch Branch) GetRow(headers []string) []string

GetRow gets the row for a table

implements common.Tableable

func (Branch) String

func (branch Branch) String() string

String gets a string representation of this Branch

implements fmt.Stringer

func (*Branch) Validate

func (branch *Branch) Validate() error

Validate validates a Branch

type BranchReference added in v0.7.0

type BranchReference struct {
	Type string `json:"type" mapstructure:"type"`
	Name string `json:"name" mapstructure:"name"`
}

func NewReference added in v0.7.0

func NewReference(name string) *BranchReference

NewReference creates a new BranchReference

type Branches added in v0.4.0

type Branches []Branch

func (Branches) GetHeader added in v0.4.0

func (branches Branches) GetHeader() []string

GetHeader gets the header for a table

implements common.Tableables

func (Branches) GetRowAt added in v0.4.0

func (branches Branches) GetRowAt(index int, headers []string) []string

GetRowAt gets the row for a table

implements common.Tableables

func (Branches) Size added in v0.4.0

func (branches Branches) Size() int

Size gets the number of elements

implements common.Tableables

Jump to

Keyboard shortcuts

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