mirror of https://github.com/velour/catbase.git
cli: move html->go to fool GitHub
This commit is contained in:
parent
42f7f52bfb
commit
f46ea524f3
|
@ -10,7 +10,6 @@ import (
|
||||||
"github.com/velour/catbase/bot"
|
"github.com/velour/catbase/bot"
|
||||||
"github.com/velour/catbase/bot/msg"
|
"github.com/velour/catbase/bot/msg"
|
||||||
"github.com/velour/catbase/bot/user"
|
"github.com/velour/catbase/bot/user"
|
||||||
"io/ioutil"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"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) {
|
func (p *CliPlugin) handleWeb(w http.ResponseWriter, r *http.Request) {
|
||||||
f, err := ioutil.ReadFile("plugins/cli/index.html")
|
fmt.Fprint(w, indexHTML)
|
||||||
if err != nil {
|
|
||||||
w.WriteHeader(500)
|
|
||||||
fmt.Fprint(w, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
w.Write(f)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Completing the Connector interface, but will not actually be a connector
|
// Completing the Connector interface, but will not actually be a connector
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
package cli
|
||||||
|
|
||||||
|
var indexHTML = `
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
@ -135,3 +138,4 @@
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
`
|
Loading…
Reference in New Issue