command

package
v1.44.0-0.dev Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Git

func Git(args ...string) (string, error)

Git runs a git command and returns trimmed stdout.

func GitBranch

func GitBranch() (string, error)

GitBranch returns the current git branch.

func GitDir

func GitDir() (string, error)

GitDir returns the repo root directory.

func GitHubMilestoneOpen

func GitHubMilestoneOpen(repo, milestone string) (bool, error)

GitHubMilestoneOpen reports whether a GitHub milestone with the given title exists and is open in the specified repo. The repo must be in "owner/name" format (e.g., "tigera/operator").

func GitInDir

func GitInDir(dir string, args ...string) (string, error)

GitInDir runs a git command in the given directory and returns trimmed stdout.

func GitLsRemote

func GitLsRemote(remote, ref string, flags ...string) (string, error)

GitLsRemote runs git ls-remote with the provided arguments.

func GitLsRemoteHeads

func GitLsRemoteHeads(remote, branch string) (string, error)

GitLsRemoteHeads runs git ls-remote --heads for a branch.

func GitLsRemoteTags

func GitLsRemoteTags(remote, tag string) (string, error)

GitLsRemoteTags runs git ls-remote --tags for a tag.

func GitRefExistsInRemote

func GitRefExistsInRemote(lsRemoteOutput, ref string) bool

GitRefExistsInRemote checks if a ref exists in git ls-remote output.

func GitShowFile

func GitShowFile(ref, path string) (string, error)

GitShowFile reads a file from a specific git ref.

func GitVersion

func GitVersion() (string, error)

GitVersion returns the current git version using describe with long format and dirty flag.

func MakeInDir

func MakeInDir(dir string, targets string, env ...string) (string, error)

MakeInDir runs make with the provided targets and environment variables in the specified directory.

func Run

func Run(name string, args, env []string) (string, error)

Run executes a command and returns its trimmed stdout.

func RunInDir

func RunInDir(dir, name string, args, env []string) (string, error)

RunInDir executes a command in the given directory and returns its trimmed stdout.

Types

This section is empty.

Jump to

Keyboard shortcuts

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