Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
iesreza committed Sep 30, 2022
1 parent 7ecb416 commit 8d143e1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions evo.context.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type Request struct {
Response Response
CacheKey string
CacheDuration time.Duration
Debug bool
debug interface{}
flashes []flash
}
type flash struct {
Expand Down Expand Up @@ -90,8 +90,16 @@ func Upgrade(ctx *fiber.Ctx) *Request {
return &r
}

func (r *Request) Debug() bool {
return r.debug != nil
}

func (r *Request) SetDebug(debug bool) {
r.Debug = debug
if debug {
r.debug = struct{}{}
return
}
r.debug = nil
}

func (r *Request) Flash(params ...string) {
Expand Down

0 comments on commit 8d143e1

Please sign in to comment.