env

package
v0.0.80 Latest Latest
Warning

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

Go to latest
Published: May 10, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExists added in v0.0.31

func FileExists(pathOrContent any) ([]byte, error)

FileExists checks if a file exists and returns its contents. Accepts string (path) or []byte (content). For paths, verifies existence and reads the file. For []byte, returns the provided content directly.

func GetSize added in v0.0.67

func GetSize(pathOrContent any) (int64, error)

GetSize returns the size of a file or byte slice. For backend: uses os.Stat for files, len() for byte slices.

func SetupDefaultFileWriter

func SetupDefaultFileWriter() func(filename string, data []byte) error

func SetupDefaultLogger

func SetupDefaultLogger() func(a ...any)

SetupDefaultLogger configures the default logger for backend environments

Types

type FileWriter added in v0.0.67

type FileWriter func(filename string, data []byte) error

FileWriter is a function type for writing PDF data to a file

Jump to

Keyboard shortcuts

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