iohelper

package module
v0.0.0-...-8e83377 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SafeRead

func SafeRead(file, backupFile string) ([]byte, error)

SafeRead reads alls data from file. Alternatively reads from backupFile if the default file does not exist or is broken.

func SafeWrite

func SafeWrite(data []byte, file, backupFile string) error

SafeWrite writes the given data and hash to file. Uses backupFile as temporary storage to be resistant against unexpected crashes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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