util

package
v0.0.0-...-9bdcb4f Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const KubernetesVersionFile = "kubernetes-version.txt"

Variables

View Source
var ErrFileNotFoundInPath = errors.New("file not found in $PATH")

Functions

func DetectKubernetesVersion

func DetectKubernetesVersion() (string, error)

func ExecuteCommand

func ExecuteCommand(name string, args ...string) error

func LookPath

func LookPath(file string) (string, error)

LookPath finds a file on the PATH. It uses a similar process to exec.LookPath, but can find regular files.

func Must

func Must[T any](t T, err error) T

func NewHTTPHeaderAPIOptions

func NewHTTPHeaderAPIOptions(headers []string) ([]func(*middleware.Stack) error, error)

NewHTTPHeaderAPIOptions returns a slice of middleware options that adds the specified HTTP headers to an API request. Each header should be of the format `Header-Key: Header-Value`, in the same manner as headers are passed with `curl`-s `-H` flag.

func ParseMinorVersion

func ParseMinorVersion(semanticVersion string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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