aboutsummaryrefslogtreecommitdiffstats
path: root/lib/notmuch/notmuch.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/notmuch/notmuch.go')
-rw-r--r--lib/notmuch/notmuch.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/notmuch/notmuch.go b/lib/notmuch/notmuch.go
new file mode 100644
index 00000000..9b13878b
--- /dev/null
+++ b/lib/notmuch/notmuch.go
@@ -0,0 +1,21 @@
+//go:build notmuch
+// +build notmuch
+
+package notmuch
+
+/*
+#cgo LDFLAGS: -lnotmuch
+
+#include <stdlib.h>
+#include <notmuch.h>
+
+#if !LIBNOTMUCH_CHECK_VERSION(5, 6, 0)
+#error "aerc requires libnotmuch.so.5.6 or later"
+#endif
+
+*/
+import "C"
+
+// NOTE: Any CGO call which passes a reference to a pointer (**object) will fail
+// gocritic:dupSubExpr. All of these calls are set to be ignored by the linter
+// Reference: https://github.com/go-critic/go-critic/issues/897