()
| 9 | ) |
| 10 | |
| 11 | func main() { |
| 12 | // 将 /api/main.go 的 Handler 函数注册到根路径 |
| 13 | http.HandleFunc("/", api.Handler) |
| 14 | |
| 15 | port := ":8080" |
| 16 | fmt.Printf("Server is running on http://localhost%s\n", port) |
| 17 | |
| 18 | // 启动服务器 |
| 19 | if err := http.ListenAndServe(port, nil); err != nil { |
| 20 | log.Fatal("Server error: ", err) |
| 21 | } |
| 22 | } |
nothing calls this directly
no outgoing calls
no test coverage detected