File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 33 < head >
44 < meta charset ="UTF-8 " />
55 < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
6- < title > Bash Script Formatter & Linter </ title >
6+ < title > Bash Script Tools </ title >
77 < script src ="https://cdn.tailwindcss.com "> </ script >
88 < script src ="https://cdnjs.cloudflare.com/ajax/libs/ace/1.32.2/ace.js "> </ script >
99 < script src ="https://cdnjs.cloudflare.com/ajax/libs/ace/1.32.2/mode-sh.min.js "> </ script >
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package main
22
33import (
44 "bytes"
5+ _ "embed"
56 "encoding/json"
67 "fmt"
78 "html/template"
2021 shellcheckPath = getEnvOrDefault ("SHELLCHECK_PATH" , "shellcheck" )
2122)
2223
24+ //go:embed index.html
25+ var indexHTML string
26+
2327type ShellcheckResponse struct {
2428 HTML string `json:"html"`
2529 Annotations []Annotation `json:"annotations"`
@@ -59,7 +63,7 @@ func main() {
5963}
6064
6165func handleIndex (w http.ResponseWriter , r * http.Request ) {
62- tmpl := template .Must (template .ParseFiles ("index.html" ))
66+ tmpl := template .Must (template .New ("index" ). Parse ( indexHTML ))
6367 tmpl .Execute (w , nil )
6468}
6569
You can’t perform that action at this time.
0 commit comments