unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] go: add binding for notmuch_message_get_date
@ 2015-03-02 20:39 Trevor Jim
  2015-03-03 12:32 ` Tomi Ollila
  0 siblings, 1 reply; 6+ messages in thread
From: Trevor Jim @ 2015-03-02 20:39 UTC (permalink / raw)
  To: notmuch


---
 bindings/go/src/notmuch/notmuch.go | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/bindings/go/src/notmuch/notmuch.go b/bindings/go/src/notmuch/notmuch.go
index b9230ad..f5fd54c 100644
--- a/bindings/go/src/notmuch/notmuch.go
+++ b/bindings/go/src/notmuch/notmuch.go
@@ -801,7 +801,13 @@ func (self *Message) SetFlag(flag Flag, value bool) {
 	C.notmuch_message_set_flag(self.message, C.notmuch_message_flag_t(flag), v)
 }
 
-// TODO: wrap notmuch_message_get_date
+func  (self *Message) GetDate() int64 {
+	if self.message == nil {
+		return -1
+	}
+	timestamp := C.notmuch_message_get_date(self.message)
+	return int64(timestamp)
+}
 
 /* Get the value of the specified header from 'message'.
  *
-- 
2.2.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-03-06  7:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-02 20:39 [PATCH] go: add binding for notmuch_message_get_date Trevor Jim
2015-03-03 12:32 ` Tomi Ollila
2015-03-03 14:10   ` David Bremner
2015-03-03 16:22     ` Trevor Jim
2015-03-06  7:20       ` David Bremner
2015-03-03 16:39   ` Trevor Jim

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).