函数定义
func assert1(guard bool, text string) {
if !guard {panic(text)
}
}
调用
assert1(path[0] == '/', "path must begin with '/'")
assert1(len(method) > 0, "HTTP method can not be empty")
assert1(len(handlers) > 0, "there must be at least one handler")