testhelper

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package testhelper provides some useful helpers for testing in github.com/dave/diskfs subpackages

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DockerRun

func DockerRun(input io.Reader, output io.Writer, trust bool, rm bool, img string, args ...string) error

DockerRun run a docker container thanks to moby/tool, which is licensed apache 2.0

Types

type FileImpl

type FileImpl struct {
	Reader reader
	Writer writer
}

FileImpl implement github.com/dave/diskfs/util/File used for testing to enable stubbing out files

func (*FileImpl) ReadAt

func (f *FileImpl) ReadAt(b []byte, offset int64) (int, error)

ReadAt read at a particular offset

func (*FileImpl) Seek

func (f *FileImpl) Seek(offset int64, whence int) (int64, error)

Seek seek a particular offset - does not actually work

func (*FileImpl) WriteAt

func (f *FileImpl) WriteAt(b []byte, offset int64) (int, error)

WriteAt write at a particular offset

Jump to

Keyboard shortcuts

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