cli: move html->go to fool GitHub

This commit is contained in:
Chris Sexton 2019-05-27 19:26:17 -04:00
parent 42f7f52bfb
commit f46ea524f3
2 changed files with 5 additions and 8 deletions

View File

@ -10,7 +10,6 @@ import (
"github.com/velour/catbase/bot"
"github.com/velour/catbase/bot/msg"
"github.com/velour/catbase/bot/user"
"io/ioutil"
"net/http"
"time"
)
@ -83,13 +82,7 @@ func (p *CliPlugin) handleWebAPI(w http.ResponseWriter, r *http.Request) {
}
func (p *CliPlugin) handleWeb(w http.ResponseWriter, r *http.Request) {
f, err := ioutil.ReadFile("plugins/cli/index.html")
if err != nil {
w.WriteHeader(500)
fmt.Fprint(w, err)
return
}
w.Write(f)
fmt.Fprint(w, indexHTML)
}
// Completing the Connector interface, but will not actually be a connector

View File

@ -1,3 +1,6 @@
package cli
var indexHTML = `
<!DOCTYPE html>
<html lang="en">
<head>
@ -135,3 +138,4 @@
</script>
</body>
</html>
`