errorhandling

package
v2.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseQuiet

func CloseQuiet(f *os.File)

CloseQuiet closes a file and logs any error. Should only be used within a defer.

func ErrorsToStrings

func ErrorsToStrings(errs []error) []string

ErrorsToString converts the slice of errors into a slice of corresponding error messages.

func JoinErrors

func JoinErrors(errs []error) error

JoinErrors converts the error slice into a single human-readable error.

func StringsToErrors

func StringsToErrors(strErrs []string) []error

StringsToErrors converts a slice of error messages into a slice of corresponding errors.

func SyncQuiet

func SyncQuiet(f *os.File)

SyncQuiet syncs a file and logs any error. Should only be used within a defer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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