go fmt
This commit is contained in:
parent
331192ccbe
commit
2f4cc04db2
|
@ -3,6 +3,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
gc "github.com/rthornton128/goncurses"
|
gc "github.com/rthornton128/goncurses"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,6 @@ type loginUpload struct {
|
||||||
Password string
|
Password string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (l loginChecker) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
func (l loginChecker) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
if addr := r.Header.Get("X-Forwarded-For"); addr != "" {
|
if addr := r.Header.Get("X-Forwarded-For"); addr != "" {
|
||||||
r.RemoteAddr = addr
|
r.RemoteAddr = addr
|
||||||
|
|
|
@ -105,7 +105,8 @@ func main() {
|
||||||
log.Println(fmt.Sprintf("Ready, listening on %s", *bind))
|
log.Println(fmt.Sprintf("Ready, listening on %s", *bind))
|
||||||
|
|
||||||
// Wait shutdown signal
|
// Wait shutdown signal
|
||||||
mloop: for {
|
mloop:
|
||||||
|
for {
|
||||||
switch <-interrupt {
|
switch <-interrupt {
|
||||||
case syscall.SIGHUP:
|
case syscall.SIGHUP:
|
||||||
log.Println("Reloading students files...")
|
log.Println("Reloading students files...")
|
||||||
|
@ -113,7 +114,7 @@ func main() {
|
||||||
log.Println("Error during students.csv reload:", err)
|
log.Println("Error during students.csv reload:", err)
|
||||||
}
|
}
|
||||||
case syscall.SIGTERM, syscall.SIGINT:
|
case syscall.SIGTERM, syscall.SIGINT:
|
||||||
break mloop;
|
break mloop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user