mirror of
https://github.com/kataras/iris.git
synced 2025-02-02 15:30:36 +01:00
This commit is contained in:
parent
f91269130e
commit
5e0bea8112
|
@ -5,8 +5,8 @@ import "github.com/kataras/iris/v12"
|
||||||
func main() {
|
func main() {
|
||||||
app := iris.New()
|
app := iris.New()
|
||||||
|
|
||||||
app.Get("/", func(c iris.Context) {
|
app.Get("/", func(ctx iris.Context) {
|
||||||
c.Writef("Hello %s", "world")
|
ctx.Writef("Hello %s", "world")
|
||||||
})
|
})
|
||||||
|
|
||||||
// This is an Iris-only feature across all web frameworks
|
// This is an Iris-only feature across all web frameworks
|
||||||
|
@ -24,7 +24,7 @@ func main() {
|
||||||
|
|
||||||
// http://localhost:8080 -> FOUND (Hello world)
|
// http://localhost:8080 -> FOUND (Hello world)
|
||||||
// http://localhost:8080/other -> NOT FOUND
|
// http://localhost:8080/other -> NOT FOUND
|
||||||
// http://localhost/@ -> NOT FOUND
|
// http://localhost:8080/@ -> NOT FOUND
|
||||||
// http://localhost:8080/@kataras -> FOUND (username is kataras)
|
// http://localhost:8080/@kataras -> FOUND (username is kataras)
|
||||||
app.Listen(":8080")
|
app.Listen(":8080")
|
||||||
}
|
}
|
||||||
|
|
|
@ -267,7 +267,8 @@ func (db *Database) Delete(sid string, key string) (deleted bool) {
|
||||||
|
|
||||||
// Clear removes all session key values but it keeps the session entry.
|
// Clear removes all session key values but it keeps the session entry.
|
||||||
func (db *Database) Clear(sid string) error {
|
func (db *Database) Clear(sid string) error {
|
||||||
keys := db.keys(db.makeSID(sid))
|
sid = db.makeSID(sid)
|
||||||
|
keys := db.keys(sid)
|
||||||
for _, key := range keys {
|
for _, key := range keys {
|
||||||
if key == SessionIDKey {
|
if key == SessionIDKey {
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue
Block a user