mirror of
https://github.com/syssecfsu/witty.git
synced 2025-01-25 19:44:24 +01:00
Update main.go
This commit is contained in:
parent
2d5a56b040
commit
6db0fbdbb9
6
main.go
6
main.go
@ -56,7 +56,7 @@ func fillIndex(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
fp, err := os.OpenFile("web_term.log", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644)
|
fp, err := os.OpenFile("witty.log", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644)
|
||||||
|
|
||||||
if err == nil {
|
if err == nil {
|
||||||
defer fp.Close()
|
defer fp.Close()
|
||||||
@ -95,11 +95,11 @@ func main() {
|
|||||||
|
|
||||||
c.HTML(http.StatusOK, "term.html", gin.H{
|
c.HTML(http.StatusOK, "term.html", gin.H{
|
||||||
"title": "interactive terminal",
|
"title": "interactive terminal",
|
||||||
"path": "/ws_do",
|
"path": "/ws_new",
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
rt.GET("/ws_do", func(c *gin.Context) {
|
rt.GET("/ws_new", func(c *gin.Context) {
|
||||||
term_conn.ConnectTerm(c.Writer, c.Request, false, "", cmdToExec)
|
term_conn.ConnectTerm(c.Writer, c.Request, false, "", cmdToExec)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user