gofmt
This commit is contained in:
parent
42795c6cef
commit
ad765f5798
3
main.go
3
main.go
|
@ -83,6 +83,7 @@ func csrfSecret() string {
|
|||
}
|
||||
return string(bytes)
|
||||
}
|
||||
|
||||
type CSRFErrorHandler struct{}
|
||||
|
||||
func (self CSRFErrorHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
|
@ -110,7 +111,7 @@ func main() {
|
|||
|
||||
fmt.Println("Listening on", config.Port, "...")
|
||||
|
||||
err := http.ListenAndServe(":"+config.Port, csrf.Protect([]byte(csrfSecret()), /*errHandler,*/ csrfSecurityOption)(muxRouter))
|
||||
err := http.ListenAndServe(":"+config.Port, csrf.Protect([]byte(csrfSecret()) /*errHandler,*/, csrfSecurityOption)(muxRouter))
|
||||
if err != nil {
|
||||
fmt.Println("Fatal Error: ", err)
|
||||
}
|
||||
|
|
|
@ -2,12 +2,12 @@ package news
|
|||
|
||||
import (
|
||||
"database/sql"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/dballard/transmet/categories"
|
||||
_ "github.com/lib/pq"
|
||||
"time"
|
||||
"errors"
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
|
||||
type News struct {
|
||||
|
@ -230,5 +230,3 @@ func convertSqlToNewsContainer(rows *sql.Rows) (map[int]*NewsContainer, int, err
|
|||
|
||||
return newsTree, count, nil
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue