Debian Codegraph @

lib/notmuch/notmuch.go

raw
1 //go:build notmuch
2 // +build notmuch
3
4 package notmuch
5
6 /*
7 #cgo LDFLAGS: -lnotmuch
8
9 #include <stdlib.h>
10 #include <notmuch.h>
11
12 #if !LIBNOTMUCH_CHECK_VERSION(5, 6, 0)
13 #error "aerc requires libnotmuch.so.5.6 or later"
14 #endif
15
16 */
17 import "C"
18 import "fmt"
19
20 const (
21 MAJOR_VERSION = C.LIBNOTMUCH_MAJOR_VERSION
22 MINOR_VERSION = C.LIBNOTMUCH_MINOR_VERSION
23 MICRO_VERSION = C.LIBNOTMUCH_MICRO_VERSION
24 )
25
26 func Version() string {
27 return fmt.Sprintf("%d.%d.%d", MAJOR_VERSION, MINOR_VERSION, MICRO_VERSION)
28 }
29
30 // NOTE: Any CGO call which passes a reference to a pointer (**object) will fail
31 // gocritic:dupSubExpr. All of these calls are set to be ignored by the linter
32 // Reference: https://github.com/go-critic/go-critic/issues/897