util

package
v0.0.0-...-4b07ea2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileUtil

type FileUtil interface {
	// Read reads the file named by filename and returns all the contents unitl EOF or an error.
	Read(string) ([]byte, error)
	// Write writes data to a file named by filename.
	Write(string, []byte, os.FileMode) error
}

FileUtil is the interface for utility functions operating on files.

type FileUtilImpl

type FileUtilImpl struct {
}

FileUtilImpl is an implementation of File.

func (FileUtilImpl) Read

func (f FileUtilImpl) Read(filename string) ([]byte, error)

Read reads the file named by filename and returns all the contents until EOF or an error.

func (FileUtilImpl) Write

func (f FileUtilImpl) Write(filename string, content []byte, perm os.FileMode) error

Write writes data to a file named by filename.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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