Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
i4erkasov committed Feb 4, 2024
1 parent f484688 commit 96acb9f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion migrate/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import (
"database/sql"
"errors"
"fmt"
"time"

"github.com/golang-migrate/migrate/v4"
"github.com/golang-migrate/migrate/v4/database/postgres"
_ "github.com/golang-migrate/migrate/v4/source/file"
"time"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion migrate/with_vipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package migrate

import (
"fmt"
"github.com/spf13/viper"
"os"
"strings"

"github.com/spf13/viper"
)

var required = []string{"user", "password", "host", "port", "dbname"}
Expand Down
5 changes: 3 additions & 2 deletions pgx/tx.go → pgx/tx_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package pgx
import (
"context"
"errors"
"sync/atomic"

"github.com/i4erkasov/go-pgsql/pgxpool"
"github.com/jackc/pgx/v4"
"sync/atomic"
)

// Tx is an alias to pgx.Tx
Expand Down Expand Up @@ -174,7 +175,7 @@ func (t *Transactor) beginNestedTx(ctx context.Context) (context.Context, bool,
if err != nil {
// In case of an error, decrement the counter back.
ctx = tickTxCounter(ctx, -1)
return nil, false, err
return ctx, false, err
}
return ctx, true, nil
}
Expand Down
3 changes: 2 additions & 1 deletion pgx/tx_test.go → pgx/tx_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package pgx
import (
"context"
"errors"
"testing"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/suite"
"testing"
)

type txManagerTestSuite struct {
Expand Down
3 changes: 2 additions & 1 deletion pgxpool/pgxpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package pgxpool

import (
"fmt"
"strings"

"github.com/jackc/pgx/v4/pgxpool"
"github.com/spf13/viper"
"strings"
)

// Pool is an alias to pgxpool.Pool
Expand Down

0 comments on commit 96acb9f

Please sign in to comment.