mirror of
https://github.com/syssecfsu/witty.git
synced 2025-01-11 12:42:35 +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() {
|
||||
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 {
|
||||
defer fp.Close()
|
||||
@ -95,11 +95,11 @@ func main() {
|
||||
|
||||
c.HTML(http.StatusOK, "term.html", gin.H{
|
||||
"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)
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user