branch

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package branch provides types and functions for working with git branches.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Branch

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

Branch represents a git branch with its name.

It encapsulates the branch name and provides methods to interact with it.

func NewBranch

func NewBranch(name Name) Branch

NewBranch creates a new Branch instance with the given Name.

func (Branch) String

func (b Branch) String() string

String returns the string representation of the Branch, which is its Name.

type Name

type Name string

Name represents the name of a git branch.

func NewName

func NewName(name string) Name

NewName creates a new branch Name from the given string.

func (Name) Empty

func (n Name) Empty() bool

Empty checks if the branch name is empty.

func (Name) String

func (n Name) String() string

String returns the string representation of the branch name.

Jump to

Keyboard shortcuts

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