fix #18; add "go get go-bindata" to go generate

pull/20/head
Henrique Dias 2015-09-26 21:03:34 +01:00
parent e7528ba7c9
commit 62ed665af2
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,6 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"io/ioutil" "io/ioutil"
"log"
"net/http" "net/http"
"os" "os"
"path/filepath" "path/filepath"
@ -110,12 +109,12 @@ func servePost(w http.ResponseWriter, r *http.Request, c *config.Config, filenam
t, err := time.Parse("2006-01-02 15:04:05-07:00", rawFile["date"].(string)) t, err := time.Parse("2006-01-02 15:04:05-07:00", rawFile["date"].(string))
if err != nil { if err != nil {
log.Print(err) w.Write([]byte(err.Error()))
return 500, err return 500, err
} }
scheduler := cron.New() scheduler := cron.New()
scheduler.AddFunc(t.Format("05 04 15 02 01 *"), func() { scheduler.AddFunc(t.In(time.Now().Location()).Format("05 04 15 02 01 *"), func() {
// Set draft to false // Set draft to false
rawFile["draft"] = false rawFile["draft"] = false

View File

@ -1,3 +1,4 @@
//go:generate go get github.com/jteeuwen/go-bindata
//go:generate go-bindata -pkg assets -o assets/assets.go templates/ assets/css/ assets/js/ assets/fonts/ //go:generate go-bindata -pkg assets -o assets/assets.go templates/ assets/css/ assets/js/ assets/fonts/
package hugo package hugo