JEC-go
·69 words·1 min
JEC-go#
Jabacat’s Easy Config
JEC-py | JEC-rs | JEC-go | JEC-c++ | JEC-kt | JEC-c | JEC-zig | JEC-ts
API #
ConfigFile
- Exists
- Remove
- Create
- FromHome
ConfigDir
- Exists
- Remove
- Create
- FromHome
Usage #
conf := ConfigFile{"./test.conf"}
if !conf.Exists() {
conf.Create()
}
dir := ConfigDir{"./config/"}
if !dir.Exists() {
dir.Create()
}
conf.Remove()
dir.Remove()
conf = ConfigFile{""}.FromHome("./test.conf")
strings.Contains(conf.path, "home") // true at /home/user/test.conf