aboutsummaryrefslogtreecommitdiff
path: root/cap.go
diff options
context:
space:
mode:
Diffstat (limited to 'cap.go')
-rw-r--r--cap.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/cap.go b/cap.go
new file mode 100644
index 0000000..83dfbda
--- /dev/null
+++ b/cap.go
@@ -0,0 +1,25 @@
+package main
+
+import (
+ "strings"
+)
+
+var Caps = map[string]string{
+ "sasl": "PLAIN,EXTERNAL",
+}
+
+var capls string
+
+// Can't be in init() because Caps will be registered with init in the future
+// and init()s are executed by filename alphabetical order
+func setupCapls() {
+ capls = ""
+ for k, v := range Caps {
+ capls += k
+ if v != "" {
+ capls += "=" + v
+ }
+ capls += " "
+ }
+ capls = strings.TrimSuffix(capls, " ")
+}