Skip to content

Commit 1e455d6

Browse files
committed
style: fix S1017 lint warning in dsn parser
1 parent 5638a53 commit 1e455d6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

internal/db/dsn/parser.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,7 @@ func parseMySQLTCP(raw string) (*Config, error) {
176176
}
177177

178178
// Parse /dbname?params
179-
if strings.HasPrefix(afterParen, "/") {
180-
afterParen = afterParen[1:]
181-
}
179+
afterParen = strings.TrimPrefix(afterParen, "/")
182180

183181
if qIdx := strings.Index(afterParen, "?"); qIdx != -1 {
184182
cfg.Database = afterParen[:qIdx]

0 commit comments

Comments
 (0)