Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40d5297042 | ||
|
|
8bde331200 |
1 changed files with 7 additions and 4 deletions
11
main.go
11
main.go
|
|
@ -17,7 +17,7 @@ import (
|
|||
"strings"
|
||||
)
|
||||
|
||||
const VERSION = "v3"
|
||||
const VERSION = "v5"
|
||||
|
||||
var (
|
||||
flagVerbose bool
|
||||
|
|
@ -49,7 +49,11 @@ func main() {
|
|||
http.HandleFunc("/sites", actionSites)
|
||||
|
||||
log.Println("Listen on [::]:5123")
|
||||
http.ListenAndServe("[::]:5123", nil)
|
||||
err := http.ListenAndServe("[::]:5123", nil)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
func replaceTilde(str string) string { // {{{
|
||||
|
|
@ -84,8 +88,7 @@ func pageIndex(w http.ResponseWriter, r *http.Request) { // {{{
|
|||
func pageCSS(w http.ResponseWriter, r *http.Request) { // {{{
|
||||
w.Header().Add("Content-Type", "text/css")
|
||||
|
||||
//data, err := fs.ReadFile("static/css/main.css")
|
||||
data, err := os.ReadFile("static/css/main.css")
|
||||
data, err := fs.ReadFile("static/css/main.css")
|
||||
if err != nil {
|
||||
w.Write([]byte(err.Error()))
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue