Compare commits
No commits in common. "2c078285b8c452ad544e01f5cdebd5e00a606595" and "f94e307bc84b24f4df9fe326ff459a7b96ec8d6f" have entirely different histories.
2c078285b8
...
f94e307bc8
2
Makefile
2
Makefile
|
@ -1,2 +1,2 @@
|
|||
minecraft-site: minecraft-site.go index.html go.mod go.sum
|
||||
minecraft-site:
|
||||
go build -tags netgo -ldflags '-extldflags "-static"'
|
||||
|
|
|
@ -2,7 +2,6 @@ package main
|
|||
|
||||
import (
|
||||
"crypto/tls"
|
||||
_ "embed"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"html/template"
|
||||
|
@ -36,9 +35,6 @@ type pageData struct {
|
|||
Servers []server
|
||||
}
|
||||
|
||||
//go:embed index.html
|
||||
var indexhtml string
|
||||
|
||||
func main() {
|
||||
|
||||
// Parse config file
|
||||
|
@ -67,7 +63,7 @@ func main() {
|
|||
|
||||
// Set up templates
|
||||
fmt.Print("Parsing templates...\n")
|
||||
t, err := template.New("").Parse(indexhtml)
|
||||
t, err := template.ParseFiles("templates/index.html")
|
||||
if err != nil {
|
||||
log.Fatalf("Error parsing HTML template: %v\n", err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue