util

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetWorkingDir = func() string {
	workingDir, err := os.Getwd()
	CheckErr(err)
	return workingDir
}

GetWorkingDir returns the current working directory

Functions

func CheckErr

func CheckErr(err error)

CheckErr checks for an error use this function after calling an error returning function

func CheckErrMsg

func CheckErrMsg(err error, msg string)

CheckErrMsg checks for an error and prints out a custom error message use this function after calling an error returning function

func GetUnixFilePath added in v0.3.0

func GetUnixFilePath(filePath string) string

GetUnixFilePath transforms a unix/windows file path into an unix file path

func ToSlash added in v0.3.0

func ToSlash(path string) string

ToSlash returns the result of replacing each separator character in path with a slash ('/') character. Multiple separators are replaced by multiple slashes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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