mirror of https://github.com/gofiber/fiber.git
fix lint errors
parent
b50d91d58e
commit
bb90fc1187
|
@ -34,7 +34,7 @@ type Config struct {
|
|||
|
||||
// Name of the session cookie. This cookie will store session key.
|
||||
// Optional. Default value "csrf_".
|
||||
// Overriden if KeyLookup == "cookie:<name>"
|
||||
// Overridden if KeyLookup == "cookie:<name>"
|
||||
CookieName string
|
||||
|
||||
// Domain of the CSRF cookie.
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package csrf
|
||||
|
||||
import "crypto/subtle"
|
||||
import (
|
||||
"crypto/subtle"
|
||||
)
|
||||
|
||||
func compareTokens(a, b []byte) bool {
|
||||
return subtle.ConstantTimeCompare(a, b) == 1
|
||||
return subtle.ConstantTimeCompare(a, b) == 1
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package csrf
|
||||
|
||||
import "time"
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type Token struct {
|
||||
Key string `json:"key"`
|
||||
|
|
|
@ -53,7 +53,7 @@ func AssertEqual(tb testing.TB, expected, actual interface{}, description ...str
|
|||
_, _ = fmt.Fprintf(w, "\nExpect:\t%v\t(%s)", expected, aType)
|
||||
_, _ = fmt.Fprintf(w, "\nResult:\t%v\t(%s)", actual, bType)
|
||||
|
||||
result := ""
|
||||
var result string
|
||||
if err := w.Flush(); err != nil {
|
||||
result = err.Error()
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue