Skip to content

Commit 3292397

Browse files
committed
go lint
- Simple declaration
1 parent 83e0ff4 commit 3292397

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func handleComments(w http.ResponseWriter, r *http.Request) {
5757
switch r.Method {
5858
case "POST":
5959
// Decode the JSON data
60-
comments := make([]comment, 0)
60+
var comments []comment
6161
if err := json.Unmarshal(commentData, &comments); err != nil {
6262
http.Error(w, fmt.Sprintf("Unable to Unmarshal comments from data file (%s): %s", dataFile, err), http.StatusInternalServerError)
6363
return

0 commit comments

Comments
 (0)