utility

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(filePath string, handler func(*os.File) error) error

Create creates a file using os.Create, passes it to a handler function, and ensures that it is closed after the handler is done.

func Open

func Open(filePath string, handler func(*os.File) error) error

Open opens a file using os.Open, passes it to a handler function, and ensures that it is closed after the handler is done.

func OpenFile

func OpenFile(name string, flag int, perm os.FileMode, handler func(*os.File) error) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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