summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md34
1 files changed, 34 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..5a5a8a5
--- /dev/null
+++ b/README.md
@@ -0,0 +1,34 @@
+# ENV Library
+
+Works like sh ENV, but is file based.
+
+## Design goals
+
+* backwards compatible: saved files are compatible with bash ENV syntax
+* simple: only string key=value pairs
+* concurrent: use file locks
+* global: ENV functions can be called from anywhere
+* dynamic: automaticly detect ENV changes by the file mtime
+
+## Theory of Operation
+
+The core philosophy of this library is to standardize ENV in a new way
+
+ENV configuration files are loaded in this defined order:
+
+1. /usr/share/doc/foo/foo.env # upstream application defaults
+2. /etc/foo/foo.env # OS distribution defaults
+3. /etc/default/foo # system admin overrides
+4. ~/.config/foo/foo.env # your user settings
+
+## function examples
+
+```
+key := ENV.Get("APIKEY")
+
+if ENV.True("verbose") {
+ fmt.Println("worked")
+}
+
+ENV.Set("LocalPort", "8080")
+```