go format
This commit is contained in:
parent
cb95df096d
commit
0a8e352622
4
main.go
4
main.go
@ -136,7 +136,7 @@ func genStudent(login string) map[string]*Submission {
|
||||
ret[dir.Name()] = new(Submission)
|
||||
ret[dir.Name()].Date = fi.ModTime()
|
||||
if lnk, err := os.Readlink(p); err == nil {
|
||||
ret[dir.Name()].Hash = strings.TrimPrefix(lnk, login + ".")
|
||||
ret[dir.Name()].Hash = strings.TrimPrefix(lnk, login+".")
|
||||
}
|
||||
} else {
|
||||
ret[dir.Name()] = nil
|
||||
@ -211,7 +211,7 @@ func main() {
|
||||
http.HandleFunc("/", Serve)
|
||||
http.HandleFunc("/rendus.json", ServeJSON)
|
||||
for _, student := range students {
|
||||
http.HandleFunc("/" + student[2] + ".json", ServeJSONStudent)
|
||||
http.HandleFunc("/"+student[2]+".json", ServeJSONStudent)
|
||||
}
|
||||
log.Println(fmt.Sprintf("Ready, listening on %s", *bind))
|
||||
if err := http.ListenAndServe(*bind, nil); err != nil {
|
||||
|
Reference in New Issue
Block a user