diff options
Diffstat (limited to 'lib/notmuch/notmuch.go')
-rw-r--r-- | lib/notmuch/notmuch.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/notmuch/notmuch.go b/lib/notmuch/notmuch.go index 9b13878b..27c0bdfa 100644 --- a/lib/notmuch/notmuch.go +++ b/lib/notmuch/notmuch.go @@ -15,6 +15,17 @@ package notmuch */ import "C" +import "fmt" + +const ( + MAJOR_VERSION = C.LIBNOTMUCH_MAJOR_VERSION + MINOR_VERSION = C.LIBNOTMUCH_MINOR_VERSION + MICRO_VERSION = C.LIBNOTMUCH_MICRO_VERSION +) + +func Version() string { + return fmt.Sprintf("%d.%d.%d", MAJOR_VERSION, MINOR_VERSION, MICRO_VERSION) +} // 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 |