io

package
v0.0.0-...-de7d074 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(fsys fs.FS, globPattern string) ([]byte, error)

Read returns the byte of the first matching file.

func ReadJson

func ReadJson[T any](path string) (T, error)

ReadJson reads the file and unmarshals to the type as JSON

func ReadString

func ReadString(fsys fs.FS, globPattern string) (string, error)

ReadString returns the first matching file as a string.

func WriteJson

func WriteJson(path string, v any) error

WriteJson writes the any to the file as JSON.

Types

This section is empty.

Jump to

Keyboard shortcuts

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