testhelper

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package testhelper provides some useful helpers for testing in github.com/cusspvz/go-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, mounts map[string]string, 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/cusspvz/go-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