diff --git a/main.go b/main.go index cd7dd04..ce91bd1 100644 --- a/main.go +++ b/main.go @@ -43,7 +43,7 @@ func createStreamResponse(fromLanguage, toLanguage, message string) string { return string(jsonResp) } -func streamResponse(w http.ResponseWriter, fromLanguage, toLanguage string, messages <-chan string) { +func streamResponse(w http.ResponseWriter, messages <-chan string) { w.Header().Set("Content-Type", "application/json; charset=utf-8") w.Header().Set("Cache-Control", "no-cache") w.Header().Set("Connection", "keep-alive") @@ -55,7 +55,7 @@ func streamResponse(w http.ResponseWriter, fromLanguage, toLanguage string, mess } for msg := range messages { - formattedMessage := createStreamResponse(fromLanguage, toLanguage, msg) + formattedMessage := createStreamResponse(msg) fmt.Fprintf(w, " %s\n\n", formattedMessage) flusher.Flush() }