Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6276b00

Browse files
committed
update DSN logging message
1 parent0a3190e commit6276b00

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎coderd/database/dbtestutil/postgres.go‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ func WithLogDSN(logDSN bool) OpenOption {
162162
// TBSubset is a subset of the testing.TB interface.
163163
// It allows to use dbtestutil.Open outside of tests.
164164
typeTBSubsetinterface {
165+
Name()string
165166
Cleanup(func())
166167
Helper()
167168
Logf(formatstring,args...any)
@@ -239,7 +240,7 @@ func Open(t TBSubset, opts ...OpenOption) (string, error) {
239240

240241
// Optionally log the DSN to help connect to the test database.
241242
ifopenOptions.LogDSN {
242-
_,_=fmt.Fprintf(os.Stderr,"Connect tothis testdatabase using: psql '%s'\n",dsn)
243+
_,_=fmt.Fprintf(os.Stderr,"Connect tothedatabasefor %susing: psql '%s'\n",t.Name(),dsn)
243244
}
244245
returndsn,nil
245246
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp