utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDir

func CreateDir(dirPath string) error

CreateDir creates a directory path if it does not exist and returns nil if the path already exists. Will return the underlying os.Stat error if there were any other errors

func ExecuteCmd

func ExecuteCmd(path string, args []string, env []string, dir string) ([]byte, error)

ExecuteCmd wraps context around a given command and executes it.

func ReadLine

func ReadLine(r io.Reader, lineNum int) (line string, lastLine int, err error)

ReadLine grabs a specific line from the provided corpus and returns it as a string

Types

This section is empty.

Jump to

Keyboard shortcuts

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