test_support

package
v0.0.0-...-3ada71e Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsolutePath

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

func FileURL(absolutePath string) string

func SameFile

func SameFile(p1 string, p2 string) bool

func Serve

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

func ServeSlow

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

Types

type ErrorReporter

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

type HttpResponse

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