test_support

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsolutePath added in v0.3.0

func AbsolutePath(path string) string

func CleanupDirs

func CleanupDirs(t ErrorReporter, paths ...string)

func CreateDir

func CreateDir(path string, dirName string) string

func CreateDirWithMode

func CreateDirWithMode(path string, dirName string, mode os.FileMode) string

func CreateFile

func CreateFile(path string, fileName string, contents ...string) string

func CreateFileWithMode

func CreateFileWithMode(path string, fileName string, mode os.FileMode, contents ...string) string

func CreateTempDir

func CreateTempDir() string

func FileExists

func FileExists(path string) bool

func FileMode

func FileMode(path string) os.FileMode

func FileURL added in v0.3.0

func FileURL(absolutePath string) string

func SameFile

func SameFile(p1 string, p2 string) bool

func Serve added in v0.3.0

func Serve(listener net.Listener, response HttpResponse) error

func ServeSlow added in v0.3.0

func ServeSlow(listener net.Listener, response HttpResponse, delay time.Duration) error

Types

type ErrorReporter

type ErrorReporter interface {
	Errorf(format string, args ...interface{})
}

type HttpResponse added in v0.3.0

type HttpResponse struct {
	StatusCode int
	Content    []byte
	Headers    map[string]string
}

Jump to

Keyboard shortcuts

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