utils

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoticeColor  = "\033[0;38m%s\u001B[0m"
	PromptColor  = "\033[1;38m%s\u001B[0m"
	CyanColor    = "\033[0;36m%s\033[0m"
	MagentaColor = "\033[0;35m%s\033[0m"
)

Variables

This section is empty.

Functions

func CheckError

func CheckError(err error)

func GetEnv

func GetEnv(key, fallback string) string

func GetHomeDir

func GetHomeDir() string

func InitializeKubeconfig

func InitializeKubeconfig(kubeconfigPath string) (*api.Config, error)

func ListContexts

func ListContexts(kubeconfigPath string) []string

func NewPromptUISearcher

func NewPromptUISearcher(items []string) list.Searcher

func SwitchContext

func SwitchContext(config *api.Config, contextName string, kubeconfigPath string) error

func TouchFile

func TouchFile(name string) error

func WriteFile

func WriteFile(config, loc string)

Types

type BellSkipper

type BellSkipper struct{}

func (*BellSkipper) Close

func (bs *BellSkipper) Close() error

func (*BellSkipper) Write

func (bs *BellSkipper) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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