WIP students list
This commit is contained in:
parent
7d681aa95a
commit
e927de80d0
2 changed files with 52 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Reference in a new issue