1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-14 07:00:40 +00:00

expose more error code in web module

This commit is contained in:
Ming Deng
2020-11-29 21:16:53 +08:00
parent 4afa9d2d25
commit 8d7f48ea75
7 changed files with 74 additions and 42 deletions

View File

@ -49,12 +49,12 @@ func (f *StrTo) Set(v string) {
// Clear string
func (f *StrTo) Clear() {
*f = StrTo(0x1E)
*f = StrTo(rune(0x1E))
}
// Exist check string exist
func (f StrTo) Exist() bool {
return string(f) != string(0x1E)
return string(f) != string(rune(0x1E))
}
// Bool string to bool

View File

@ -67,4 +67,4 @@ func TestSnakeStringWithAcronym(t *testing.T) {
t.Error("Unit Test Fail:", v, res, answer[v])
}
}
}
}