COMMENT · QUYẾT ĐỊNH
Trung cấp
CA 06 / 09
Comment giải thích lý do TỪ CHỐI 1 phương án khác
Comment thật trong main.go của golearn:
// No WriteTimeout: it applies to the whole response body, so it's
// unsuitable here (SSE streams and admin actions can run long, e.g.
// for the duration of a cluster recreate). ReadTimeout/ReadHeaderTimeout
// already guard against slow-loris style attacks on the request side.
❯ Comment trên ghi lại 1 QUYẾT ĐỊNH ĐÃ CÂN NHẮC (và loại bỏ phương án khác — đặt WriteTimeout), không chỉ mô tả code đang làm gì. Vì sao kiểu comment này có giá trị hơn comment tả lại đúng những gì dòng code đã nói rõ?