Skip to content

Commit

Permalink
little fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dworld committed Nov 6, 2014
1 parent dd97c11 commit f55ea73
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions context_flash.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ type Flash struct {
Notice string
}

const (
FlashExpire = 60
var (
FlashExpire int64 = 60
FlashAlertKey string = "ZQFA"
FlashNoticeKey string = "ZQFN"
)

var FlashAlertKey string = "ZQFA"
var FlashNoticeKey string = "ZQFN"

func (ctx *Context) SetFlashAlert(msg string) {
ctx.SetExpireCookie(FlashAlertKey, msg, FlashExpire)
}
Expand Down
4 changes: 2 additions & 2 deletions pipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ func (p *Pipe) ServePipe(w http.ResponseWriter, r *http.Request, h http.Handler)
}
}

var VoidHTTPHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
var voidHTTPHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})

func (p *Pipe) ServeHTTP(w http.ResponseWriter, r *http.Request) {
p.ServePipe(w, r, VoidHTTPHandler)
p.ServePipe(w, r, voidHTTPHandler)
}

func (p *Pipe) ServeContext(ctx *Context) {
Expand Down

0 comments on commit f55ea73

Please sign in to comment.