From a1d942e5c35f1ff31169e7fbd45bf89ca4e228d4 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sun, 1 Oct 2017 16:41:23 +0100 Subject: [PATCH] pcloud: make compile with go1.6 --- pcloud/api/types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcloud/api/types.go b/pcloud/api/types.go index bf4ad3032..b74d916c3 100644 --- a/pcloud/api/types.go +++ b/pcloud/api/types.go @@ -135,7 +135,7 @@ func (g *GetFileLinkResult) IsValid() bool { if len(g.Hosts) == 0 { return false } - return time.Until(time.Time(g.Expires)) > 30*time.Second + return time.Time(g.Expires).Sub(time.Now()) > 30*time.Second } // URL returns a URL from the Path and Hosts. Check with IsValid