common

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const EncodedHashByteLength = HashBytesUsed * 2
View Source
const HashBitsUsed = 48
View Source
const HashBytesUsed = HashBitsUsed / 8

Variables

This section is empty.

Functions

func AddDependencies

func AddDependencies(customerInputDirectory, customerOutputDirectory, instrumentorVersion string)

func CopyRecursiveNoClobber

func CopyRecursiveNoClobber(from, to string)

func GetAbsoluteDirectory

func GetAbsoluteDirectory(path string) string

GetAbsoluteDirectory converts a path, whether a symlink or a relative path, into an absolute path.

func HashFileContent

func HashFileContent(paths []string) string

HashFileContent reads the binary content of every file in paths (assumed to be in lexical order) and returns the SHA-256 digest.

func Pluralize

func Pluralize(val int, singularText string) string

func ValidateDirectories

func ValidateDirectories(input, output string) (err error)

ValidateDirectories checks that neither directory is a child of the other, and of course that they're not the same.

func WriteTextFile

func WriteTextFile(text, file_name string) (err error)

Types

type LogWriter

type LogWriter struct {
	// contains filtered or unexported fields
}

func GetLogWriter

func GetLogWriter() *LogWriter

func NewLogWriter

func NewLogWriter(logfileName string, vLevel int) *LogWriter

func (*LogWriter) Fatal

func (lW *LogWriter) Fatal(v ...any)

func (*LogWriter) Fatalf

func (lW *LogWriter) Fatalf(format string, v ...any)

func (*LogWriter) IsVerbose

func (lW *LogWriter) IsVerbose() bool

func (*LogWriter) Printf

func (lW *LogWriter) Printf(format string, v ...any)

func (*LogWriter) VerboseLevel

func (lW *LogWriter) VerboseLevel(v int) bool

Jump to

Keyboard shortcuts

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