hooks

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureDir

func EnsureDir(path string) error

EnsureDir creates directory and all parents if they don't exist

func FileExists

func FileExists(path string) bool

FileExists returns true if the file exists

func ReadJSON

func ReadJSON(path string, v any) error

ReadJSON reads a JSON file into the provided struct handles non-existent and empty files gracefully by leaving v unchanged

func WriteJSON

func WriteJSON(path string, v any, perm os.FileMode) error

WriteJSON writes a struct to a JSON file with given permissions marshals with indentation for readability

Types

This section is empty.

Jump to

Keyboard shortcuts

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