Documentation ¶
Index ¶
- Variables
- func AssertEqual(t *testing.T, expected, got interface{}) bool
- func AssertError(t *testing.T, got interface{}) bool
- func AssertExpected(t *testing.T, expected, got interface{}) bool
- func AssertLen(t *testing.T, expected, got interface{}) bool
- func AssertNil(t *testing.T, got interface{}) bool
- func AssertNoError(t *testing.T, got interface{}) bool
- func AssertNotNil(t *testing.T, got interface{}) bool
- func AssertTrue(t *testing.T, got interface{}) bool
- func BtoGB(b uint64) uint64
- func BtoKB(b uint64) uint64
- func BtoMB(b uint64) uint64
- func ChecksumCRC32(data []byte) uint32
- func ChecksumCRC64(data []byte) uint64
- func CleanPath(path string) (string, string)
- func CreateBaseDir(base string) error
- func CreateFile(path string) error
- func CreateFileSize(path string, size int64) error
- func DEBUG(format string, v ...interface{})
- func FilePointerOffset(fd *os.File) int64
- func FormatTime(msg string, t1, t2 time.Time) string
- func FormattedWidthBytes(b []byte, n int) []byte
- func FormattedWidthString(s string, n int) string
- func GetFilepath() (string, string)
- func GetListOfRandomWordsHttp(num int) []string
- func HandleSigInt(fn func())
- func HandleSignalInterrupt(msg string, args ...interface{})
- func HideFile(filename string) error
- func InspectStruct(v interface{})
- func InspectStructV(val reflect.Value)
- func ListDir(path string) error
- func MkDir(name string) string
- func Msg(msg string) (string, time.Time)
- func NewFileWatch(path string)
- func OpenFile(path string) (*os.File, error)
- func OpenTempFile(dir, file string) *os.File
- func Pack2U32(dst *uint64, src1, src2 uint32)
- func PrintStats(mem runtime.MemStats)
- func PrintStatsTab(mem runtime.MemStats)
- func RandBytes(n int) []byte
- func RandIntn(min, max int) int
- func RandString(n int) string
- func ReadData(fd *os.File, data []byte)
- func ShutdownHook(fn func())
- func Sizeof(objs ...interface{}) (sz uint64)
- func StructFields(m interface{}) (string, []reflect.StructField)
- func TimeThis(msg string, start time.Time)
- func Trace() string
- func TruncateFile(fd *os.File, size int64) error
- func Unpack2U32(dst *uint64) (uint32, uint32)
- func UpdateBaseDir(base string) (string, error)
- func WalkDir(path string) error
- func WatchFile(path string) error
- func WriteData(fd *os.File, data []byte)
Constants ¶
This section is empty.
Variables ¶
View Source
var WaltWhitmanText string
Functions ¶
func AssertEqual ¶
func AssertError ¶
func AssertExpected ¶
func AssertNoError ¶
func AssertNotNil ¶
func AssertTrue ¶
func ChecksumCRC32 ¶ added in v1.7.0
func ChecksumCRC64 ¶ added in v1.7.0
func CreateBaseDir ¶ added in v1.6.0
func CreateFile ¶ added in v1.7.0
func CreateFileSize ¶ added in v1.7.0
func FilePointerOffset ¶ added in v1.7.0
func FormattedWidthBytes ¶ added in v1.7.0
func FormattedWidthString ¶ added in v1.7.0
func GetFilepath ¶
GetFilepath returns the absolute filepath from where it's called. It returns the result as a split string, first the root directory up until the current file and returns the two in this order: dir, file
func HandleSigInt ¶ added in v1.7.0
func HandleSigInt(fn func())
func HandleSignalInterrupt ¶
func HandleSignalInterrupt(msg string, args ...interface{})
func InspectStruct ¶
func InspectStruct(v interface{})
func InspectStructV ¶
func NewFileWatch ¶ added in v1.7.0
func NewFileWatch(path string)
func OpenTempFile ¶ added in v1.7.0
func PrintStats ¶
func PrintStatsTab ¶
func RandString ¶ added in v1.7.0
func ShutdownHook ¶ added in v1.7.0
func ShutdownHook(fn func())
func Sizeof ¶
func Sizeof(objs ...interface{}) (sz uint64)
Sizeof returns the estimated memory usage of object(s) not just the size of the type. On 64bit Sizeof("test") == 12 (8 = sizeof(StringHeader) + 4 bytes).
func StructFields ¶
func StructFields(m interface{}) (string, []reflect.StructField)
func Unpack2U32 ¶ added in v1.7.0
func UpdateBaseDir ¶ added in v1.6.0
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.