aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-03-27 00:46:54 +0900
committernsfisis <nsfisis@gmail.com>2025-03-27 00:46:59 +0900
commit0db3ba5ff7eac4a9e4f90a9d10edad98151afa40 (patch)
tree3d148dd30e4ffa8fc964632725d299125361a631
parentc40e74fed85e3f0c5b084ddf3deba79d31e6926b (diff)
downloadterm-clock-0db3ba5ff7eac4a9e4f90a9d10edad98151afa40.tar.gz
term-clock-0db3ba5ff7eac4a9e4f90a9d10edad98151afa40.tar.zst
term-clock-0db3ba5ff7eac4a9e4f90a9d10edad98151afa40.zip
refactor: use for loop range over int
-rw-r--r--internal/term/draw.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/term/draw.go b/internal/term/draw.go
index 2ded6b3..b86b127 100644
--- a/internal/term/draw.go
+++ b/internal/term/draw.go
@@ -17,9 +17,9 @@ func init() {
}
func DrawSquare(scr *Screen, xOffset, yOffset, w, h int, style Style) {
- for dx := 0; dx < w; dx++ {
+ for dx := range w {
x := xOffset + dx
- for dy := 0; dy < h; dy++ {
+ for dy := range h {
y := yOffset + dy
scr.scr.SetContent(x, y, ' ', nil, tcell.Style(style))
}