chore: change new_hono to Hono.new
This commit is contained in:
+1
-1
@@ -167,7 +167,7 @@ fn get_content_type(file_path string) string {
|
||||
```v
|
||||
import hono
|
||||
|
||||
mut app := hono.new_hono()
|
||||
mut app := hono.Hono.new()
|
||||
|
||||
// 使用默认配置
|
||||
app.use(hono.serve_static_default())
|
||||
|
||||
+3
-3
@@ -210,13 +210,13 @@ pub fn (mut app Hono) clear_cache() {
|
||||
app.context_hybrid_router.clear_cache()
|
||||
}
|
||||
|
||||
pub fn new_hono() Hono {
|
||||
pub fn Hono.new() Hono {
|
||||
return Hono{
|
||||
server: http.Server{}
|
||||
routes: map[string]Hono{}
|
||||
base_path: ''
|
||||
context_router: ContextRouter{}
|
||||
context_hybrid_router: ContextHybridRouter.new()
|
||||
context_trie_router: ContextTrieRouter.new()
|
||||
context_hybrid_router: ContextHybridRouter.new()
|
||||
context_trie_router: ContextTrieRouter.new()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user