utils

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AskUserYesNoQuestion

func AskUserYesNoQuestion(question string) bool

AskUserYesNoQuestion ask a question and wait for user input.

func ChWorkdir added in v0.1.2

func ChWorkdir(args []string) (string, func(), error)

func Chdir

func Chdir(dir string) error

func CountLeadingSpaces

func CountLeadingSpaces(line string) int

func MustGetwd

func MustGetwd() string

func ReadFile

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

func ReadYaml

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

func WriteStringToFile

func WriteStringToFile(filename string, text string) error

Types

type CommandRunner added in v0.1.1

type CommandRunner struct {
	Dir string
}

func NewCommandRunner added in v0.1.1

func NewCommandRunner(dir string) *CommandRunner

func (*CommandRunner) Run added in v0.1.1

func (c *CommandRunner) Run(ctx context.Context, name string, args ...string) (string, error)

Jump to

Keyboard shortcuts

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