Tons of unit tests

This commit is contained in:
Manu Mtz-Almeida
2015-04-09 12:15:02 +02:00
parent ac1ee3fb86
commit 0a192fb0fa
26 changed files with 1477 additions and 86 deletions
+4 -1
View File
@@ -61,6 +61,9 @@ func (c *Context) reset() {
func (c *Context) Copy() *Context {
var cp Context = *c
cp.writermem.ResponseWriter = nil
cp.Writer = &cp.writermem
cp.Input.context = &cp
cp.index = AbortIndex
cp.handlers = nil
return &cp
@@ -161,7 +164,7 @@ func (c *Context) MustGet(key string) interface{} {
if value, exists := c.Get(key); exists {
return value
} else {
panic("Key " + key + " does not exist")
panic("Key \"" + key + "\" does not exist")
}
}