testing

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirStats

func DirStats(path string) (directories, files int, size bytesize.ByteSize)

func FProfile

func FProfile(name string, cb func()) time.Duration

func PProfile

func PProfile(name string, cb func()) time.Duration

func ParseTime

func ParseTime(str string) time.Time

func PrintTime

func PrintTime(t time.Time) int

func Profile

func Profile(name string, cb func()) time.Duration

func SetupLogging

func SetupLogging()

func SimpleTime

func SimpleTime(i int) time.Time

func SimpleUTime

func SimpleUTime(i int) time.Time

func TmpDir

func TmpDir(cb func(name string))

Types

type FakeListener

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

FakeListener implements net.Listener and has an extra method (Provide) that allows

you to queue a connection to be consumed via Accept.

func NewFakeListener

func NewFakeListener() *FakeListener

func (*FakeListener) Accept

func (fl *FakeListener) Accept() (net.Conn, error)

func (*FakeListener) Addr

func (*FakeListener) Addr() net.Addr

func (*FakeListener) Close

func (fl *FakeListener) Close() error

func (*FakeListener) Provide

func (fl *FakeListener) Provide(conn net.Conn) error

type TmpDirectory

type TmpDirectory struct {
	Path string
}

func TmpDirSync

func TmpDirSync() *TmpDirectory

func (*TmpDirectory) Close

func (t *TmpDirectory) Close()

Jump to

Keyboard shortcuts

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