filesystem

package module
v0.0.0-...-e7cd65d Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 4 Imported by: 0

README

filesystem

Go Reference Go Report Card

go get git.gorbe.io/go/filesystem@latest

Get the latest commit (if Go module proxy is not updated):

go get "git.gorbe.io/go/filesystem@$(curl -s 'https://git.gorbe.io/api/v1/repos/go/filesystem/commits' | jq -r '.[0].sha')"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFileJSON

func ReadFileJSON(name string, v any) error

ReadFileJSON reads the named file and unmarshals the content in the value pointed to by v.

func ReadFileYAML

func ReadFileYAML(name string, v any) error

ReadFileYAML reads the named file and unmarshals the content in the value pointed to by v.

func ReadJSON

func ReadJSON(r io.Reader, v any) error

ReadJSON reads from r until an error or EOF and unmarshals the data in the value pointed to by v.

func ReadYAML

func ReadYAML(r io.Reader, v any) error

ReadYAML reads from r until an error or EOF and unmarshals the data in the value pointed to by v.

func UserCacheDir

func UserCacheDir() string

UserCacheDir an alias to os.UserCacheDir, but panics on error.

func UserConfigDir

func UserConfigDir() string

UserConfigDir an alias to os.UserConfigDir, but panics on error.

func UserHomeDir

func UserHomeDir() string

UserHomeDir an alias to os.UserHomeDir, but panics on error.

func WriteFileJSON

func WriteFileJSON(name string, v any, perm os.FileMode) error

WriteFileJSON the JSON encoded data of v to the named file.

Uses os.WriteFile

func WriteFileYAML

func WriteFileYAML(name string, v any, perm os.FileMode) error

WriteFileYAML the YAML encoded data of v to the named file.

Uses os.WriteFile

func WriteJSON

func WriteJSON(w io.Writer, v any) error

WriteJSON writes the JSON encoding bytes of v and writes to w.

func WriteYAML

func WriteYAML(w io.Writer, v any) error

WriteYAML writes the YAML encoding bytes of v and writes to w.

Types

This section is empty.

Jump to

Keyboard shortcuts

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