Documentation
¶
Overview ¶
Package io contains input/output and filesystem-related functions.
Index ¶
- func AppendString(text, path string) error
- func BaseFileName(path string) string
- func ClearScreen()
- func CountNonEmptyLines(path string) (int, error)
- func EnsurePathExists(path string) error
- func GetCommandOptions(defaultCommand string) (string, map[string]string)
- func IsDir(path string) bool
- func OpenFile(path string) error
- func PathExists(path string) bool
- func ReadCSV(path string) ([][]string, error)
- func ReadFile(path string) (string, error)
- func ReadJSON[T any](path string) (*T, error)
- func ReadJSONList[T any](path string) ([]T, error)
- func ReadJSONMap[T any](path string) (map[string]T, error)
- func ReadLines(path string) ([]string, error)
- func ReadNonEmptyLines(path string) ([]string, error)
- func ReadRawLines(path string) ([]string, error)
- func RunCommand(args ...string) error
- func RunGoInstall(path string) error
- func SaveIndentedJSON[T any](item T, path string) error
- func SaveJSON[T any](item T, path string) error
- func SaveString(text, path string) error
- func SoftClearScreen()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountNonEmptyLines ¶
Count non-empty lines of given text file path
func EnsurePathExists ¶
Creates all non-existent folders in given path
func GetCommandOptions ¶
Get command and options
func ReadJSONList ¶
Read JSON list from given file path
func ReadJSONMap ¶
Read JSON map from given file path
func ReadLines ¶
Read lines of given text file path, Each line is trimmed for whitespace at both ends
func ReadNonEmptyLines ¶
Read non-empty lines of given text file path, Each non-empty line is trimmed for whitespace at both ends
func ReadRawLines ¶
Read lines of given text file path, Lines are not whitespace trimmed
func SaveIndentedJSON ¶
Save indented JSON object to given file path
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.