utils

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EditString added in v0.0.3

func EditString(input string) (string, error)

EditString opens the default editor with input string. Returns the edited string.

func Exec

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

func FindRelativePathInRepo added in v0.7.0

func FindRelativePathInRepo(path string) (string, error)

FindRelativePathInRepo traverses up from the current directory recursively until a relative path is found. It returns the first relative path found, or os.ErrNotExists if no relative path is found.

func GenerateTemplateFunctions added in v0.0.3

func GenerateTemplateFunctions(tokenSeparators []string) (template.FuncMap, error)

func ReadFile

func ReadFile(filename string) ([]byte, error)

func ReadYaml

func ReadYaml(filename string, data interface{}) error

func RemoveConsecutiveDuplicates

func RemoveConsecutiveDuplicates(s string, chars []rune) string

func StartSpinner

func StartSpinner(loadingMsg string, finalMsg string) *spinner.Spinner

func WriteFile added in v0.0.3

func WriteFile(filename string, content []byte) error

func WriteYaml added in v0.0.3

func WriteYaml(filename string, data interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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