utils

package
v1.11.0-cni-plu...-aa3fb74 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ReleaseFolderName is the name of the release tool in this repository.
	ReleaseFolderName = "release"

	// DirPerms is the permissions for directories.
	DirPerms os.FileMode = 0o755
)
View Source
const (
	// DefaultBranch is the default branch of the repository.
	DefaultBranch = "master"

	// DefaultRemote is the default remote for the repository.
	DefaultRemote = "origin"
)
View Source
const (
	// Calico is the product name for projectcalico.
	Calico = "calico"

	// CalicoRepoName is the name of the projectcalico repo.
	CalicoRepoName = Calico

	// BirdRepoName is the name of the bird repo.
	BirdRepoName = "bird"

	// CalicoProductCode is the code for projectcalico.
	CalicoProductCode = "os"

	// ProjectCalicoOrg is the name of the Project Calico organization.
	ProjectCalicoOrg = "projectcalico"

	// TigeraOrg is the name of the Tigera organization.
	TigeraOrg = "tigera"
)

Variables

This section is empty.

Functions

func Clone

func Clone(repo, branch, dir string) error

Clone clones the repository at the given branch as the given directory.

func Contains

func Contains(haystack []string, needle string) bool

func CopyFile

func CopyFile(src, dst string) error

func DisplayProductName

func DisplayProductName() string

DisplayProductName returns the product name in title case.

func GitBranch

func GitBranch(dir string) (string, error)

GitBranch returns the current git branch of the repository.

func GitIsDirty

func GitIsDirty(dir string) (bool, error)

GitIsDirty returns true if the repository is dirty.

func MoveFile

func MoveFile(srcPattern, dstFile string) error

MoveFile moves a file from srcPattern to dstFile. srcPattern should match exactly one file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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