fileloader

package
v0.0.0-...-8f6474b Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFailedDecodeAsMap = fmt.Errorf("failed to decode json file as map")
)

Functions

func CheckFile

func CheckFile(path string) bool

func EnsureDirExist

func EnsureDirExist(value string) error

EnsureDirExist will create it if it does not exist

/foo/file.txt -> /foo

/foo -> /

/foo/ -> /foo

func ReadAsMap

func ReadAsMap(path string) (map[string]interface{}, error)

func ReadInto

func ReadInto(path string, target interface{}) error

func ReadPropertiesFile

func ReadPropertiesFile(path string) (map[string]string, error)

func ReadPropertiesInto

func ReadPropertiesInto(path string, target interface{}) error

func WriteInto

func WriteInto(target interface{}, path string, ensureDir bool) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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