1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-02 13:20:18 +00:00

typo fixed

seperator => separator
This commit is contained in:
JessonChan
2016-01-15 14:07:37 +08:00
parent 0eaf923a27
commit 52083de720
6 changed files with 26 additions and 26 deletions

View File

@ -83,7 +83,7 @@ func (fd *FlashData) Store(c *Controller) {
c.Data["flash"] = fd.Data
var flashValue string
for key, value := range fd.Data {
flashValue += "\x00" + key + "\x23" + BConfig.WebConfig.FlashSeperator + "\x23" + value + "\x00"
flashValue += "\x00" + key + "\x23" + BConfig.WebConfig.FlashSeparator + "\x23" + value + "\x00"
}
c.Ctx.SetCookie(BConfig.WebConfig.FlashName, url.QueryEscape(flashValue), 0, "/")
}
@ -96,7 +96,7 @@ func ReadFromRequest(c *Controller) *FlashData {
vals := strings.Split(v, "\x00")
for _, v := range vals {
if len(v) > 0 {
kv := strings.Split(v, "\x23"+BConfig.WebConfig.FlashSeperator+"\x23")
kv := strings.Split(v, "\x23"+BConfig.WebConfig.FlashSeparator+"\x23")
if len(kv) == 2 {
flash.Data[kv[0]] = kv[1]
}