From 0f2696ec8b9e6c8dac1c6d1df95cd891d2439d72 Mon Sep 17 00:00:00 2001 From: Bolke de Bruin <bolke@xs4all.nl> Date: Tue, 21 Jul 2020 19:53:54 +0200 Subject: [PATCH] Cleanup --- http.go | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 http.go diff --git a/http.go b/http.go deleted file mode 100644 index a45134d..0000000 --- a/http.go +++ /dev/null @@ -1,21 +0,0 @@ -package main - -import ( - "net/http" - "strconv" -) - -const ( - HttpOK = "HTTP/1.1 200 OK\r\n" - MethodRDGIN = "RDG_IN_DATA" - MethodRDGOUT = "RDG_OUT_DATA" -) - -// httpError is like the http.Error with WebSocket context exception. -func httpError(w http.ResponseWriter, body string, code int) { - w.Header().Set("Content-Type", "text/plain; charset=utf-8") - w.Header().Set("Content-Length", strconv.Itoa(len(body))) - w.WriteHeader(code) - w.Write([]byte(body)) -} - -- GitLab