utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 9 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 AppendIfNotExists

func AppendIfNotExists(slice []string, s string) []string

func CheckError

func CheckError(err error)

func Contains

func Contains(slice []string, str string) bool

func GetCurrentProfileFile

func GetCurrentProfileFile() string

func GetEnv

func GetEnv(key, fallback string) string

func GetHomeDir

func GetHomeDir() string

func GetProfileFileLocation

func GetProfileFileLocation() string

func GetProfiles

func GetProfiles() []string

func IsDirectoryExists

func IsDirectoryExists(path string) bool

func NewPromptUISearcher

func NewPromptUISearcher(items []string) list.Searcher

func TouchFile

func TouchFile(name string) error

func WriteFile

func WriteFile(config, loc string) error

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