Compare commits

..

No commits in common. "2c078285b8c452ad544e01f5cdebd5e00a606595" and "f94e307bc84b24f4df9fe326ff459a7b96ec8d6f" have entirely different histories.

3 changed files with 2 additions and 6 deletions

View file

@ -1,2 +1,2 @@
minecraft-site: minecraft-site.go index.html go.mod go.sum minecraft-site:
go build -tags netgo -ldflags '-extldflags "-static"' go build -tags netgo -ldflags '-extldflags "-static"'

View file

@ -2,7 +2,6 @@ package main
import ( import (
"crypto/tls" "crypto/tls"
_ "embed"
"encoding/json" "encoding/json"
"fmt" "fmt"
"html/template" "html/template"
@ -36,9 +35,6 @@ type pageData struct {
Servers []server Servers []server
} }
//go:embed index.html
var indexhtml string
func main() { func main() {
// Parse config file // Parse config file
@ -67,7 +63,7 @@ func main() {
// Set up templates // Set up templates
fmt.Print("Parsing templates...\n") fmt.Print("Parsing templates...\n")
t, err := template.New("").Parse(indexhtml) t, err := template.ParseFiles("templates/index.html")
if err != nil { if err != nil {
log.Fatalf("Error parsing HTML template: %v\n", err) log.Fatalf("Error parsing HTML template: %v\n", err)
} }