@@ -72,8 +72,8 @@ func renderHTML(fileData string, successMessage string, errorMessage string) {
7272 page .Applications = config .Applications
7373 page .ErrorMessage = errorMessage
7474 page .SuccessMessage = successMessage
75- fmt .Println ("Status: 200 OK\n Content-Type: text/html; charset=utf-8\n Server: synoedit" , AppVersion )
76- fmt .Println ( )
75+ fmt .Print ("Status: 200 OK\r \ n Content-Type: text/html; charset=utf-8\r \n Server: synoedit" , AppVersion )
76+ fmt .Print ( " \r \n \r \n " )
7777 err = tmpl .Execute (os .Stdout , page )
7878 if err != nil {
7979 logError (err .Error ())
@@ -146,8 +146,8 @@ func main() {
146146 output := ExecuteAction (appName )
147147
148148 if ajax == "true" {
149- fmt .Println ("Status: 200 OK\n Content-Type: text/plain;\n " )
150- fmt .Println (output )
149+ fmt .Print ("Status: 200 OK\r \ n Content-Type: text/plain;\r \n \r \n " )
150+ fmt .Print (output )
151151 return
152152 }
153153 renderHTML (fileData , "Not implemented" , "" )
@@ -159,8 +159,8 @@ func main() {
159159 SaveFile (filePath , fileData )
160160
161161 if ajax == "true" {
162- fmt .Println ("Status: 200 OK\n Content-Type: text/plain;\n " )
163- fmt .Println ("File saved successfully!" )
162+ fmt .Print ("Status: 200 OK\r \ n Content-Type: text/plain;\r \n \r \n " )
163+ fmt .Print ("File saved successfully!" )
164164 return
165165 }
166166 renderHTML (fileData , "File saved successfully!" , "" ) // not complete
@@ -180,8 +180,8 @@ func main() {
180180
181181 if ajax := readGet ().Get ("ajax" ); ajax == "true" {
182182 // expect an ajax response
183- fmt .Println ("Status: 200 OK\n Content-Type: text/plain;\n " )
184- fmt .Println (fileData )
183+ fmt .Print ("Status: 200 OK\r \ n Content-Type: text/plain;\r \n \r \n " )
184+ fmt .Print (fileData )
185185 return
186186 }
187187 // else respond with full html
0 commit comments