Documentation ¶
Overview ¶
Package fileutil provides utilities for file operations
Index ¶
- Constants
- func FileExists(file string) error
- func FileNames(folder string) ([]string, error)
- func FolderExists(dir string) error
- func LoadConfigWithSchema(config string) (string, error)
- func Marshal(fn string, value interface{}) error
- func SaveConfigWithSchema(path, value string) error
- func SubfolderNames(folder string) ([]string, error)
- func Unmarshal(file string, v interface{}) error
Constants ¶
View Source
const ( // FileSource specifies to load config from a file FileSource = "file://" // EnvSource specifies to load config from an environment variable EnvSource = "env://" )
Variables ¶
This section is empty.
Functions ¶
func LoadConfigWithSchema ¶
LoadConfigWithSchema returns a configuration loaded from file:// or env:// If config does not start with file:// or env://, then the value is returned as is
func SaveConfigWithSchema ¶
SaveConfigWithSchema saves configuration to file:// or env://
func SubfolderNames ¶
SubfolderNames returns list of subfolders in provided folder
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.