util

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: BSD-3-Clause Imports: 7 Imported by: 59

Documentation

Index

Constants

View Source
const (
	// FormatBZ2 represents a bz2 file
	FormatBZ2 = "bz2"

	// FormatGZ represents a GZ file
	FormatGZ = "gz"

	// FormatTGZ represents a GZ file
	FormatTGZ = "tgz"

	// FormatTAR represents a simple TAR file
	FormatTAR = "tar"

	// UnkownFormat is the value returned when the format cannot be detected
	UnknownFormat = ""
)

Constants defining the format of the MPI package

View Source
const (
	// UnsupportedURLTyps is a constant for a type of URL that we do not support yet
	UnsupportedURLType = ""

	// FileURL is a constant for a file-based URL
	FileURL = "file"

	// HttpURL is a constant for a HTTP-based URL
	HttpURL = "http"

	// GitURL is a constant for a Git URL
	GitURL = "git"
)

Constants defining the URL types

Variables

This section is empty.

Functions

func CleanupString

func CleanupString(str string) string

CleanupString cleans up a string. This is convenient when a benchmark returns colored text to the terminal that we then try to parse.

func CopyFile

func CopyFile(src string, dst string) error

CopyFile is a utility functions that copies a file

func DetectTarballFormat

func DetectTarballFormat(filepath string) string

DectectTarballFormat detects the format of a tarball so we can know how to untar it.

func DetectURLType

func DetectURLType(url string) string

DetectURLType detects the type of the URL that is passed in.

func DirInit

func DirInit(path string) error

DirInit ensures that the target directory is clean/empty

func FileExists

func FileExists(path string) bool

FileExists is a utility function that checks whether a file exists or not. If the file exits, FileExists return true; otherwise it returns false.

func GetTarArgs

func GetTarArgs(format string) string

GetTarOpts returns the arguments to use with tar based on the format of the tarball

func IsDir

func IsDir(name string) bool

IsDir checks whether a path is pointing at a directory or not

func OpenLogFile

func OpenLogFile(prefix string, name string) *os.File

OpenLogFile opens the log file for the execution of a command

func OpenResultsFile

func OpenResultsFile(filepath string) *os.File

OpenResultsFile opens the result files associated to the experiments

func PathExists

func PathExists(path string) bool

PathExists checks whether a given path exists

Types

This section is empty.

Jump to

Keyboard shortcuts

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