istio: istio.io/istio/pkg/test/util/file Index | Files

package file

import "istio.io/istio/pkg/test/util/file"

Index

Package Files

file.go

func AsBytes Uses

func AsBytes(filename string) ([]byte, error)

AsBytes is a simple wrapper around ioutil.ReadFile provided for completeness.

func AsBytesOrFail Uses

func AsBytesOrFail(t test.Failer, filename string) []byte

AsBytesOrFail calls AsBytes and fails the test if any errors occurred.

func AsString Uses

func AsString(filename string) (string, error)

AsString is a convenience wrapper around ioutil.ReadFile that converts the content to a string.

func AsStringOrFail Uses

func AsStringOrFail(t test.Failer, filename string) string

AsStringOrFail calls AsBytesOrFail and then converts to string.

func Copy Uses

func Copy(src string, dest string) error

Copy the source file to the destination file. Creates the destination file if it doesn't exist, otherwise overwrites it.

Package file imports 3 packages (graph) and is imported by 4 packages. Updated 2019-10-22. Refresh now. Tools for package owners.