INNER CODE UNIT · Go

main

zan8in/afrog · pkg/db/sqlite/cmd/main.go:11

func main() {

	err := sqlite.InitX()
	if err != nil {
		fmt.Println(err.Error())
		return
	}

	http.HandleFunc("/list", listHandler)

	// 启动HTTP服务器并监听端口
	http.ListenAndServe(":8080", nil)

}

func listHandler(w http.ResponseWriter, r *http.Request) {
	// 获取查询参数
	keyword := r.URL.Query().Get("keyword")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…