Skip to content

Latest commit

 

History

History
47 lines (38 loc) · 823 Bytes

README.md

File metadata and controls

47 lines (38 loc) · 823 Bytes

JEC-go 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