1 Return-Path: <feh@noam.feh.name>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id D9C9D431FC0
\r
6 for <notmuch@notmuchmail.org>; Sat, 2 Mar 2013 06:57:32 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id pB1vhf9e3ahN for <notmuch@notmuchmail.org>;
\r
16 Sat, 2 Mar 2013 06:57:28 -0800 (PST)
\r
17 Received: from noam.feh.name (noam.feh.name [176.9.34.52])
\r
18 by olra.theworths.org (Postfix) with ESMTP id F187C431FBD
\r
19 for <notmuch@notmuchmail.org>; Sat, 2 Mar 2013 06:57:27 -0800 (PST)
\r
20 Received: by noam.feh.name (Postfix, from userid 1000)
\r
21 id 5EC23157C12E; Sat, 2 Mar 2013 15:51:18 +0100 (CET)
\r
22 From: Julius Plenz <julius@plenz.com>
\r
23 To: notmuch@notmuchmail.org
\r
24 Subject: [PATCH 2/3] Go bindings: wrap notmuch_message_get_date
\r
25 Date: Sat, 2 Mar 2013 15:50:55 +0100
\r
26 Message-Id: <1362235856-15358-2-git-send-email-julius@plenz.com>
\r
27 X-Mailer: git-send-email 1.7.2.5
\r
28 In-Reply-To: <1362235856-15358-1-git-send-email-julius@plenz.com>
\r
29 References: <1362235856-15358-1-git-send-email-julius@plenz.com>
\r
30 X-Mailman-Approved-At: Sat, 02 Mar 2013 09:47:30 -0800
\r
31 Cc: Julius Plenz <julius@plenz.com>
\r
32 X-BeenThere: notmuch@notmuchmail.org
\r
33 X-Mailman-Version: 2.1.13
\r
35 List-Id: "Use and development of the notmuch mail system."
\r
36 <notmuch.notmuchmail.org>
\r
37 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
38 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
39 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
40 List-Post: <mailto:notmuch@notmuchmail.org>
\r
41 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
42 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
43 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
44 X-List-Received-Date: Sat, 02 Mar 2013 14:57:33 -0000
\r
47 bindings/go/src/notmuch/notmuch.go | 8 +++++++-
\r
48 1 file changed, 7 insertions(+), 1 deletion(-)
\r
50 diff --git a/bindings/go/src/notmuch/notmuch.go b/bindings/go/src/notmuch/notmuch.go
\r
51 index 0bdbba9..306b104 100644
\r
52 --- a/bindings/go/src/notmuch/notmuch.go
\r
53 +++ b/bindings/go/src/notmuch/notmuch.go
\r
54 @@ -12,6 +12,7 @@ package notmuch
\r
60 // Status codes used for the return values of most functions
\r
61 type Status C.notmuch_status_t
\r
62 @@ -559,7 +560,12 @@ func (self *Message) SetFlag(flag Flag, value bool) {
\r
63 C.notmuch_message_set_flag(self.message, C.notmuch_message_flag_t(flag), v)
\r
66 -// TODO: wrap notmuch_message_get_date
\r
67 +func (self *Message) GetDate() time.Time {
\r
68 + if self.message == nil {
\r
69 + return time.Unix(0, 0)
\r
71 + return time.Unix(int64(C.notmuch_message_get_date(self.message)), 0)
\r
74 // Get the value of the specified header from the message. The value
\r
75 // will be read from the actual message file, not from the notmuch
\r