summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fnl/util.fnl10
1 files changed, 10 insertions, 0 deletions
diff --git a/fnl/util.fnl b/fnl/util.fnl
new file mode 100644
index 0000000..ae52bac
--- /dev/null
+++ b/fnl/util.fnl
@@ -0,0 +1,10 @@
+;; Utility functions.
+(module util)
+
+(defn load-plugin [name]
+ (let [(ok? val-or-err) (pcall require name)]
+ (when ok?
+ (val-or-err))
+ (when (not ok?)
+ (print "Could not load config: " val-or-err))))
+