Remove uncessary variable

This commit is contained in:
Eliot Whalan 2016-07-15 13:09:19 +10:00
parent 68205953c4
commit 9c87dbabed
No known key found for this signature in database
GPG Key ID: C0A42175139840D6
1 changed files with 1 additions and 5 deletions

View File

@ -138,12 +138,8 @@ func Save(raw string, lang string, title string, expiry string) Response {
const timeFormat = "2006-01-02 15:04:05" const timeFormat = "2006-01-02 15:04:05"
expiry = "P" + expiry
dura, err := duration.FromString(expiry) // dura is time.Duration type dura, err := duration.FromString(expiry) // dura is time.Duration type
Check(err)
if err != nil {
fmt.Println("Error : ", err)
}
duration := dura.ToDuration() duration := dura.ToDuration()
expiryTime := time.Now().Add(duration).Format(timeFormat) expiryTime := time.Now().Add(duration).Format(timeFormat)