38 lines
590 B
Go
Raw Normal View History

2023-10-04 17:13:03 +02:00
package main
2023-10-04 17:29:22 +02:00
import (
"html/template"
"log"
"net/http"
)
type Person struct {
FirstName string
LastName string
}
type Instructor Person
type Participant struct {
Person
Company string
}
type Briefing struct {
Instructor
Date string
Time string
State string
Location string
Participants []Participant
}
2023-10-04 17:29:22 +02:00
func main() {
mux := http.NewServeMux()
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
template.Must(template.ParseFiles("templates/index.html")).Execute(w, nil)
})
log.Fatalln(http.ListenAndServe(":8080", mux))
}