(w http.ResponseWriter, allow string)
| 844 | } |
| 845 | |
| 846 | func writeMethodNotAllowed(w http.ResponseWriter, allow string) { |
| 847 | w.Header().Set("Allow", allow) |
| 848 | writeJSON(w, http.StatusMethodNotAllowed, map[string]any{"error": "method not allowed"}) |
| 849 | } |
| 850 | |
| 851 | // ServerPort 从 PULSE_SERVER_ADDR 解析监听端口,默认返回 8080。 |
| 852 | func ServerPort() int { |
no test coverage detected