reader

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFile

func ReadFile(file string) (map[string]any, error)

ReadFile reads a file and parses its content based on file extension. Returns an error if the file cannot be read or the file type is unsupported.

func Register

func Register(r Reader, ext ...string)

Register registers its Reader for some kind of file extension. Must be called in init functions only.

Types

type Reader

type Reader func(b []byte) (map[string]any, error)

Reader parses raw bytes into a nested map[string]any.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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