common

package module
v0.0.0-...-82cdbcf Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: GPL-3.0 Imports: 13 Imported by: 6

Documentation

Overview

Package common collection of small utils

Index

Constants

This section is empty.

Variables

View Source
var TestData string

TestData directory for working files

View Source
var TestDir string

TestDir working dir for tests

Functions

func ChdirToFile

func ChdirToFile(file string) error

ChdirToFile change working directory to the filename

func CheckSkip

func CheckSkip(line string) (skip bool)

CheckSkip checks if a line can be skipped

func ExecuteOsCommand

func ExecuteOsCommand(cmdArgs []string, stdIn io.Reader) (stdOut string, stdErr string, err error)

ExecuteOsCommand runs an OS command and returns output

func GetEnv

func GetEnv(key, fallback string) string

GetEnv read an OS Env variable

func ReadFileByLine

func ReadFileByLine(filename string) ([]string, error)

ReadFileByLine read a file and return array of lines

func ReadFileToString

func ReadFileToString(filename string) (string, error)

ReadFileToString read a file and return a string

func RemoveSpace

func RemoveSpace(s string) string

RemoveSpace deletes all spaces and newlines from string

Types

This section is empty.

Jump to

Keyboard shortcuts

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