diff --git a/pkg/login-validator/cmd/index.go b/pkg/login-validator/cmd/index.go
deleted file mode 100644
index e8e963f..0000000
--- a/pkg/login-validator/cmd/index.go
+++ /dev/null
@@ -1,78 +0,0 @@
-package main
-
-import (
- "net/http"
- "text/template"
-)
-
-const indextpl = `
-
-
-
- Challenge Forensic - Administration
-
-
-
-
-
-
-
-
-
-
-
-
{{"{{ box.title }}"}} {{"{{ box.msg }}"}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-`
-
-func Index(w http.ResponseWriter, r *http.Request) {
- w.Header().Set("Content-Type", "text/html")
-
- if indexTmpl, err := template.New("index").Parse(indextpl); err != nil {
- http.Error(w, "Cannot create template: "+err.Error(), http.StatusInternalServerError)
- } else if err := indexTmpl.Execute(w, nil); err != nil {
- http.Error(w, "An error occurs during template execution: "+err.Error(), http.StatusInternalServerError)
- }
-}
diff --git a/pkg/login-validator/cmd/main.go b/pkg/login-validator/cmd/main.go
index d704e37..24447f2 100644
--- a/pkg/login-validator/cmd/main.go
+++ b/pkg/login-validator/cmd/main.go
@@ -75,7 +75,6 @@ func main() {
log.Println("Registering handlers...")
mux := http.NewServeMux()
- mux.HandleFunc("/", Index)
mux.Handle("/login", lc)
mux.HandleFunc("/logout", logout)
http.HandleFunc("/", mux.ServeHTTP)
@@ -94,9 +93,7 @@ func main() {
if lc.students, err = readStudentsList(studentsFile); err != nil {
log.Println("Error during students.csv reload:", err)
}
- case syscall.SIGTERM:
- break mloop;
- case syscall.SIGINT:
+ case syscall.SIGTERM, syscall.SIGINT:
break mloop;
}
}