This commit is contained in:
2026-05-27 18:37:52 +08:00
parent 9e82656eeb
commit 698223234d
14 changed files with 931 additions and 301 deletions

11
standalone/json.go Normal file
View File

@@ -0,0 +1,11 @@
package main
import (
"encoding/json"
"net/http"
)
func writeJSON(w http.ResponseWriter, v any) {
w.Header().Set("Content-Type", "application/json")
_ = json.NewEncoder(w).Encode(v)
}