file

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTempFile

func CreateTempFile(basePath, fn string, sourceBytes []byte) (string, error)

CreateTempFile creates a copy of the source file and returns the new destination file name.

func PrependFile

func PrependFile(fileName string, header string) error

func ReadFile

func ReadFile(sourceFile string) ([]byte, error)

ReadFile will read a source file and return the contents as a []byte.

func SaveFmtFile

func SaveFmtFile(fileName string, fset *token.FileSet, node interface{}) error

func UpdateFile

func UpdateFile(fileName string, data []byte) error

UpdateFile will replace an existing file with new data.

Types

This section is empty.

Jump to

Keyboard shortcuts

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