testing

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: Apache-2.0 Imports: 16 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 added in v0.0.29

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 added in v0.0.33

func SimpleUTime(i int) time.Time

func TmpDir

func TmpDir(cb func(name string))

func WithConfig added in v0.0.29

func WithConfig(cb func(cfg **config.Config))

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()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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