From 8e211a36a3bd6095782dcfaa544c71d548e89e82 Mon Sep 17 00:00:00 2001 From: Eliot Whalan Date: Fri, 15 Jul 2016 13:09:19 +1000 Subject: [PATCH] Remove uncessary variable --- pastebin.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pastebin.go b/pastebin.go index a02420b..5ebd5d2 100644 --- a/pastebin.go +++ b/pastebin.go @@ -138,12 +138,8 @@ func Save(raw string, lang string, title string, expiry string) Response { const timeFormat = "2006-01-02 15:04:05" - expiry = "P" + expiry dura, err := duration.FromString(expiry) // dura is time.Duration type - - if err != nil { - fmt.Println("Error : ", err) - } + Check(err) duration := dura.ToDuration() expiryTime := time.Now().Add(duration).Format(timeFormat)