gemini-code-assist[bot] commented on code in PR #38491:
URL: https://github.com/apache/beam/pull/38491#discussion_r3237153539
##########
sdks/go/test/integration/io/xlang/jdbc/jdbc_test.go:
##########
@@ -32,6 +32,7 @@ import (
"github.com/apache/beam/sdks/v2/go/test/integration/internal/containers"
_ "github.com/go-sql-driver/mysql"
_ "github.com/lib/pq"
+ "strings"
Review Comment:

Standard library imports should be grouped separately from third-party
imports at the top of the `import` block. The `strings` package should be moved
to the first group (alongside `fmt`, `context`, etc.) to adhere to standard Go
formatting conventions as enforced by tools like `goimports`.
<details>
<summary>References</summary>
1. Standard Go style (enforced by gofmt/goimports) requires standard library
imports to be grouped separately and placed before third-party dependencies.
<sup>([link](https://github.com/apache/beam/blob/master/.gemini/styleguide.md))</sup>
</details>
##########
sdks/go/test/integration/io/xlang/jdbc/jdbc_test.go:
##########
@@ -60,7 +61,8 @@ func setupTestContainer(ctx context.Context, t *testing.T,
dbname, username, pas
hostname := "localhost"
dbURL := func(host string, port string) string {
- return fmt.Sprintf("postgres://%s:%s@%s:%s/%s?sslmode=disable",
username, password, host, port, dbname)
+ cleanPort := strings.Split(port, "/")[0]
Review Comment:

For splitting a string into two parts around a separator, `strings.Cut` is
more idiomatic and efficient than `strings.Split`. It avoids unnecessary slice
allocations and clearly expresses the intent of extracting the part before the
separator.
```suggestion
cleanPort, _, _ := strings.Cut(port, "/")
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]