Skip to main content
  1. Projects/

JEC-go

·69 words·1 min
Jake Roggenbuck
Author
Jake Roggenbuck
I am currently studying Computer Science

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