Documentation
¶
Overview ¶
Package fileutil provides utilities for file operations
Index ¶
- Constants
- Variables
- func FileExists(file 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 SetMemMapFs()
- 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 ¶
View Source
var Vfs = afero.NewOsFs()
Vfs is virtual file system
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://
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.