mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
remove unnecessary trim
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
package router
|
package router
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
@@ -77,9 +76,9 @@ func handleRunner(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if run.Status() == "success" {
|
if run.Status() == "success" {
|
||||||
c.Data(http.StatusOK, "", bytes.Trim(run.ReadOut(), "\x00"))
|
c.Data(http.StatusOK, "", run.ReadOut())
|
||||||
} else {
|
} else {
|
||||||
c.Data(http.StatusInternalServerError, "", bytes.Trim(run.ReadErr(), "\x00"))
|
c.Data(http.StatusInternalServerError, "", run.ReadErr())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user