diff options
author | 2018-01-02 19:15:08 -0800 | |
---|---|---|
committer | 2018-01-02 19:15:08 -0800 | |
commit | c39f2e1a8d2de6d412bcc673d29eb0f7a2d1f5f7 (patch) | |
tree | 950efc2155037ce055e1aae334e160812b0ee38f /server/core | |
parent | 3c3f397bf57e232201fccd64bad2820e6ade567a (diff) | |
download | v2-c39f2e1a8d2de6d412bcc673d29eb0f7a2d1f5f7.tar.gz v2-c39f2e1a8d2de6d412bcc673d29eb0f7a2d1f5f7.tar.zst v2-c39f2e1a8d2de6d412bcc673d29eb0f7a2d1f5f7.zip |
Rename helper packages
Diffstat (limited to 'server/core')
-rw-r--r-- | server/core/context.go | 4 | ||||
-rw-r--r-- | server/core/handler.go | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/server/core/context.go b/server/core/context.go index d80ce1f8..8145b471 100644 --- a/server/core/context.go +++ b/server/core/context.go @@ -7,7 +7,7 @@ package core import ( "net/http" - "github.com/miniflux/miniflux/helper" + "github.com/miniflux/miniflux/crypto" "github.com/miniflux/miniflux/locale" "github.com/miniflux/miniflux/logger" "github.com/miniflux/miniflux/model" @@ -111,7 +111,7 @@ func (c *Context) OAuth2State() string { // GenerateOAuth2State generate a new OAuth2 state. func (c *Context) GenerateOAuth2State() string { - state := helper.GenerateRandomString(32) + state := crypto.GenerateRandomString(32) c.store.UpdateSessionField(c.SessionID(), "oauth2_state", state) return state } diff --git a/server/core/handler.go b/server/core/handler.go index 647d9794..e6aca98a 100644 --- a/server/core/handler.go +++ b/server/core/handler.go @@ -9,12 +9,12 @@ import ( "time" "github.com/miniflux/miniflux/config" - "github.com/miniflux/miniflux/helper" "github.com/miniflux/miniflux/locale" "github.com/miniflux/miniflux/logger" "github.com/miniflux/miniflux/server/middleware" "github.com/miniflux/miniflux/server/template" "github.com/miniflux/miniflux/storage" + "github.com/miniflux/miniflux/timer" "github.com/gorilla/mux" "github.com/tomasen/realip" @@ -36,7 +36,7 @@ type Handler struct { // Use is a wrapper around an HTTP handler. func (h *Handler) Use(f HandlerFunc) http.Handler { return h.middleware.WrapFunc(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - defer helper.ExecutionTime(time.Now(), r.URL.Path) + defer timer.ExecutionTime(time.Now(), r.URL.Path) logger.Debug("[HTTP] %s %s %s", realip.RealIP(r), r.Method, r.URL.Path) if r.Header.Get("X-Forwarded-Proto") == "https" { |