And read CSS from embedded FS. Bumped to v5
This commit is contained in:
parent
8bde331200
commit
40d5297042
1 changed files with 2 additions and 3 deletions
5
main.go
5
main.go
|
|
@ -17,7 +17,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
const VERSION = "v4"
|
const VERSION = "v5"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
flagVerbose bool
|
flagVerbose bool
|
||||||
|
|
@ -88,8 +88,7 @@ func pageIndex(w http.ResponseWriter, r *http.Request) { // {{{
|
||||||
func pageCSS(w http.ResponseWriter, r *http.Request) { // {{{
|
func pageCSS(w http.ResponseWriter, r *http.Request) { // {{{
|
||||||
w.Header().Add("Content-Type", "text/css")
|
w.Header().Add("Content-Type", "text/css")
|
||||||
|
|
||||||
//data, err := fs.ReadFile("static/css/main.css")
|
data, err := fs.ReadFile("static/css/main.css")
|
||||||
data, err := os.ReadFile("static/css/main.css")
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
w.Write([]byte(err.Error()))
|
w.Write([]byte(err.Error()))
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue