WIP students list

This commit is contained in:
nemunaire 2018-02-09 16:26:15 +01:00 committed by nemunaire
commit e927de80d0
2 changed files with 52 additions and 0 deletions

View file

@ -9,7 +9,10 @@ import (
func main() {
var staticDir string
var studentsFile string
var bind = flag.String("bind", ":8081", "Bind port/socket")
flag.StringVar(&studentsFile, "students", "./students.csv", "Path to a CSV file containing students list")
flag.StringVar(&staticDir, "static", "./static/", "Directory containing static files")
flag.StringVar(&ARPTable, "arp", ARPTable, "Path to ARP table")
//var tftpdLogs = flag.String("tftpd", "/var/logs/tftpd.log", "Path to TFTPd logs")
@ -23,6 +26,12 @@ func main() {
log.Fatal(err)
}
var students []Student
students, err = readStudentsList(studentsFile)
if err != nil {
log.Fatal(err)
}
log.Println("Registering handlers...")
mux := http.NewServeMux()
mux.HandleFunc("/", Index)