Add last integration tests, remove testsuite

This commit is contained in:
Alexander Neumann
2015-06-21 17:12:38 +02:00
parent 43d4558a90
commit 5ae04b6834
12 changed files with 115 additions and 256 deletions

28
debug/hooks.go Normal file
View File

@@ -0,0 +1,28 @@
// +build !release
package debug
var (
hooks map[string]func(interface{})
)
func init() {
hooks = make(map[string]func(interface{}))
}
func Hook(name string, f func(interface{})) {
hooks[name] = f
}
func RunHook(name string, context interface{}) {
f, ok := hooks[name]
if !ok {
return
}
f(context)
}
func RemoveHook(name string) {
delete(hooks, name)
}