[oscar] all: go fix -rangeint ./...

1 view
Skip to first unread message

Hyang-Ah Hana Kim (Gerrit)

unread,
Feb 26, 2026, 10:07:56 PM (20 hours ago) Feb 26
to goph...@pubsubhelper.golang.org, Hyang-Ah Hana Kim, golang-co...@googlegroups.com

Hyang-Ah Hana Kim has uploaded the change for review

Commit message

all: go fix -rangeint ./...
Change-Id: I608ef125a1644fccf4f4bf5ef2502567a511e7c2

Change diff

diff --git a/internal/codeimage/codeimage.go b/internal/codeimage/codeimage.go
index 250919f..1891c78 100644
--- a/internal/codeimage/codeimage.go
+++ b/internal/codeimage/codeimage.go
@@ -50,7 +50,7 @@
Description: "the program",
}
// Retry several times in the hope that the LLM will eventually produce a valid program.
- for try := 0; try < 3; try++ {
+ for range 3 {
output, err := cgen.GenerateContent(ctx, schema, parts)
if err != nil {
return "", err
diff --git a/internal/diff/diff.go b/internal/diff/diff.go
index 3a07efc..e3a8e2d 100644
--- a/internal/diff/diff.go
+++ b/internal/diff/diff.go
@@ -231,7 +231,7 @@
for i := range T {
T[i] = n + 1
}
- for i := 0; i < n; i++ {
+ for i := range n {
k := sort.Search(n, func(k int) bool {
return T[k] >= J[i]
})
diff --git a/internal/search/search_test.go b/internal/search/search_test.go
index 9c39059..f36d008 100644
--- a/internal/search/search_test.go
+++ b/internal/search/search_test.go
@@ -52,7 +52,7 @@
vdb := storage.MemVectorDB(db, lg, "")
corpus := docs.New(lg, db)

- for i := 0; i < 10; i++ {
+ for i := range 10 {
id := fmt.Sprintf("id%d", i)
doc := llm.EmbedDoc{Title: fmt.Sprintf("title%d", i), Text: fmt.Sprintf("text-%s", strings.Repeat("x", i))}
corpus.Add(id, doc.Title, doc.Text)

Change information

Files:
  • M internal/codeimage/codeimage.go
  • M internal/diff/diff.go
  • M internal/search/search_test.go
Change size: XS
Delta: 3 files changed, 3 insertions(+), 3 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: oscar
Gerrit-Branch: master
Gerrit-Change-Id: I608ef125a1644fccf4f4bf5ef2502567a511e7c2
Gerrit-Change-Number: 749646
Gerrit-PatchSet: 1
Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

Ian Lance Taylor (Gerrit)

unread,
Feb 26, 2026, 11:43:35 PM (19 hours ago) Feb 26
to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Go LUCI, golang-co...@googlegroups.com
Attention needed from Hyang-Ah Hana Kim

Ian Lance Taylor voted Code-Review+2

Code-Review+2
Open in Gerrit

Related details

Attention is currently required from:
  • Hyang-Ah Hana Kim
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: oscar
Gerrit-Branch: master
Gerrit-Change-Id: I608ef125a1644fccf4f4bf5ef2502567a511e7c2
Gerrit-Change-Number: 749646
Gerrit-PatchSet: 1
Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-Comment-Date: Fri, 27 Feb 2026 04:43:31 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Nicholas Husin (Gerrit)

unread,
4:39 PM (2 hours ago) 4:39 PM
to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Go LUCI, golang-co...@googlegroups.com
Attention needed from Hyang-Ah Hana Kim

Nicholas Husin voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Hyang-Ah Hana Kim
Submit Requirements:
    • requirement satisfiedCode-Review
    • requirement satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    • requirement satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: oscar
    Gerrit-Branch: master
    Gerrit-Change-Id: I608ef125a1644fccf4f4bf5ef2502567a511e7c2
    Gerrit-Change-Number: 749646
    Gerrit-PatchSet: 1
    Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
    Gerrit-Reviewer: Nicholas Husin <hu...@google.com>
    Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Comment-Date: Fri, 27 Feb 2026 21:39:50 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Hyang-Ah Hana Kim (Gerrit)

    unread,
    4:44 PM (2 hours ago) 4:44 PM
    to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Nicholas Husin, Ian Lance Taylor, Go LUCI, golang-co...@googlegroups.com

    Hyang-Ah Hana Kim submitted the change

    Change information

    Commit message:
    all: go fix -rangeint ./...
    Change-Id: I608ef125a1644fccf4f4bf5ef2502567a511e7c2
    Reviewed-by: Nicholas Husin <hu...@google.com>
    Reviewed-by: Ian Lance Taylor <ia...@golang.org>
    Files:
    • M internal/codeimage/codeimage.go
    • M internal/diff/diff.go
    • M internal/search/search_test.go
    Change size: XS
    Delta: 3 files changed, 3 insertions(+), 3 deletions(-)
    Branch: refs/heads/master
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Nicholas Husin, +2 by Ian Lance Taylor
    • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: oscar
    Gerrit-Branch: master
    Gerrit-Change-Id: I608ef125a1644fccf4f4bf5ef2502567a511e7c2
    Gerrit-Change-Number: 749646
    Gerrit-PatchSet: 2
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages