diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2024-11-29 13:33:21 -0500 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2024-11-29 13:33:21 -0500 |
| commit | 7df70d254cd383882a21c2a727ede7225e520711 (patch) | |
| tree | 64b2ab3dacb947bf6aadd91470156cd8ad1645f2 | |
| parent | 8b05f053c42336caa595c77e142e0317bc915cce (diff) | |
| download | soen422-7df70d254cd383882a21c2a727ede7225e520711.zip | |
server: use '...' for variadic arg
| -rw-r--r-- | server/server.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/server.go b/server/server.go index 0850b60..0b9e92c 100644 --- a/server/server.go +++ b/server/server.go @@ -40,7 +40,7 @@ func main() { } func badRequest(w http.ResponseWriter, format string, a ...any) { - log.Println("Warning: bad request:", fmt.Sprintf(format, a)) + log.Println("Warning: bad request:", fmt.Sprintf(format, a...)) w.WriteHeader(http.StatusBadRequest) - fmt.Fprintf(w, format, a) + fmt.Fprintf(w, format, a...) } |