ioutil

package
v0.0.0-...-fab57c2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package ioutil provides a mockable wrapper for io/ioutil.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Impl

type Impl struct{}

func (*Impl) NopCloser

func (*Impl) NopCloser(r io.Reader) io.ReadCloser

func (*Impl) ReadAll

func (*Impl) ReadAll(r io.Reader) ([]byte, error)

func (*Impl) ReadDir

func (*Impl) ReadDir(dirname string) ([]fs.FileInfo, error)

func (*Impl) ReadFile

func (*Impl) ReadFile(filename string) ([]byte, error)

func (*Impl) TempDir

func (*Impl) TempDir(dir string, pattern string) (name string, err error)

func (*Impl) TempFile

func (*Impl) TempFile(dir string, pattern string) (f *os.File, err error)

func (*Impl) WriteFile

func (*Impl) WriteFile(filename string, data []byte, perm fs.FileMode) error

type Interface

type Interface interface {
	NopCloser(r io.Reader) io.ReadCloser
	ReadAll(r io.Reader) ([]byte, error)
	ReadDir(dirname string) ([]fs.FileInfo, error)
	ReadFile(filename string) ([]byte, error)
	TempDir(dir string, pattern string) (name string, err error)
	TempFile(dir string, pattern string) (f *os.File, err error)
	WriteFile(filename string, data []byte, perm fs.FileMode) error
}

Jump to

Keyboard shortcuts

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