Skip to content

Commit e122d15

Browse files
committed
make linter happy
1 parent 01048bb commit e122d15

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

embedded_postgres.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ func newDatabaseWithConfig(config Config) *EmbeddedPostgres {
5252

5353
// Start will try to start the configured Postgres process returning an error when there were any problems with invocation.
5454
// If any error occurs Start will try to also Stop the Postgres process in order to not leave any sub-process running.
55+
//nolint:funlen
5556
func (ep *EmbeddedPostgres) Start() error {
5657
if ep.started {
5758
return errors.New("server is already started")

embedded_postgres_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ func Test_CanStartAndStopTwice(t *testing.T) {
346346
}
347347
}
348348

349+
//nolint:funlen
349350
func Test_ReuseData(t *testing.T) {
350351
tempDir, err := ioutil.TempDir("", "embedded_postgres_test")
351352
if err != nil {
@@ -398,9 +399,11 @@ func Test_ReuseData(t *testing.T) {
398399

399400
if rows, err := db.Query("SELECT * FROM test"); err != nil {
400401
shutdownDBAndFail(t, err, database)
401-
} else if !rows.Next() {
402-
shutdownDBAndFail(t, errors.New("no row from db"), database)
403402
} else {
403+
if !rows.Next() {
404+
shutdownDBAndFail(t, errors.New("no row from db"), database)
405+
}
406+
404407
var (
405408
id int64
406409
value string

0 commit comments

Comments
 (0)