utils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Confirm

func Confirm(message string) (bool, error)

func FileExists

func FileExists(path string) (bool, error)

func GetAvailableContexts

func GetAvailableContexts() (map[string]string, error)

func IsRegex added in v0.2.0

func IsRegex(value string) bool

func RegexMatches added in v0.2.0

func RegexMatches(regex string, value string) bool

func SelectItem

func SelectItem[T comparable](items []T, selectMessage string) (T, error)

Types

type NamespacedContext

type NamespacedContext struct {
	Namespace string
	Context   string
}

func GetNamespacedContext

func GetNamespacedContext(cobraArgs []string) (*NamespacedContext, error)

func NewNamespacedContext

func NewNamespacedContext(namespace, context string) *NamespacedContext

Jump to

Keyboard shortcuts

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