BugFix related to wrong function names
This commit is contained in:
parent
40849e0fbb
commit
68032cb37d
8
main.go
8
main.go
|
@ -29,11 +29,7 @@ type StreamResponse struct {
|
||||||
|
|
||||||
const linux = "python3"
|
const linux = "python3"
|
||||||
|
|
||||||
func streamResponse(w http.ResponseWriter, fromLanguage, toLanguage string, messages <-chan string) {
|
func createStreamResponse(fromLanguage, toLanguage, message string) string {
|
||||||
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
|
||||||
w.Header().Set("Cache-Control", "no-cache")
|
|
||||||
w.Header().Set("Connection", "keep-alive")
|
|
||||||
|
|
||||||
response := StreamResponse{
|
response := StreamResponse{
|
||||||
From: fromLanguage,
|
From: fromLanguage,
|
||||||
To: toLanguage,
|
To: toLanguage,
|
||||||
|
@ -48,7 +44,7 @@ func streamResponse(w http.ResponseWriter, fromLanguage, toLanguage string, mess
|
||||||
}
|
}
|
||||||
|
|
||||||
func streamResponse(w http.ResponseWriter, fromLanguage, toLanguage string, messages <-chan string) {
|
func streamResponse(w http.ResponseWriter, fromLanguage, toLanguage string, messages <-chan string) {
|
||||||
w.Header().Set("Content-Type", "text/event-stream")
|
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
||||||
w.Header().Set("Cache-Control", "no-cache")
|
w.Header().Set("Cache-Control", "no-cache")
|
||||||
w.Header().Set("Connection", "keep-alive")
|
w.Header().Set("Connection", "keep-alive")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue