Skip to content

Commit

Permalink
fix: fix compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-vanesyan committed Oct 9, 2024
1 parent 2bf424a commit 1af6bb4
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion conduitcli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

// Execute evaluates given os.Args and executes a matched command.
func Execute(ctx context.Context, migrator conduit.Migrator) error {
func Execute(ctx context.Context, migrator *conduit.Migrator) error {
cmd := &cli.App{
Flags: common.GlobalFlags,
Commands: []*cli.Command{
Expand Down
2 changes: 1 addition & 1 deletion conduitmigrate/migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
// It wraps up the conduit.Migrator and exposes Up and Down methods for rolling up
// and back migrations respectively.
type Migrator struct {
migrator conduit.Migrator
migrator *conduit.Migrator
}

type Config struct {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/joho/godotenv v1.5.1
github.com/stretchr/testify v1.9.0
github.com/urfave/cli/v2 v2.27.4
go.inout.gg/foundations v0.0.0-20240831223942-78800f394231
go.inout.gg/foundations v0.0.0-20240922153347-0be999149d7c
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ github.com/urfave/cli/v2 v2.27.4 h1:o1owoI+02Eb+K107p27wEX9Bb8eqIoZCfLXloLUSWJ8=
github.com/urfave/cli/v2 v2.27.4/go.mod h1:m4QzxcD2qpra4z7WhzEGn74WZLViBnMpb1ToCAKdGRQ=
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4=
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM=
go.inout.gg/foundations v0.0.0-20240831223942-78800f394231 h1:wEyR8/ayzVvDQVc8UnFhd8Rv7kBcd4o/phjqxzenTh8=
go.inout.gg/foundations v0.0.0-20240831223942-78800f394231/go.mod h1:HuPi5W+AEy5o811UDjL98e2zFdReWqyKUHdRJw4wb1o=
go.inout.gg/foundations v0.0.0-20240922153347-0be999149d7c h1:xkhJcJgpXchg5mL4xxzxlmMtFepJLewCUVa81bv03Q4=
go.inout.gg/foundations v0.0.0-20240922153347-0be999149d7c/go.mod h1:/6QZOnj4l6OJz8iogY0uArlkPeUsxz1PTA2EHWotD7Q=
golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A=
golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70=
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
Expand Down
4 changes: 2 additions & 2 deletions internal/command/apply/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

var stepsFlagName = "steps"

func NewCommand(migrator conduit.Migrator) *cli.Command {
func NewCommand(migrator *conduit.Migrator) *cli.Command {
return &cli.Command{
Name: "apply",
Args: true,
Expand All @@ -30,7 +30,7 @@ func NewCommand(migrator conduit.Migrator) *cli.Command {
// apply applies a migration in the defined direction.
func apply(
ctx *cli.Context,
migrator conduit.Migrator,
migrator *conduit.Migrator,
) error {
dir, err := direction.FromString(ctx.Args().First())
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (m *Migrator) existingMigrationVerions(ctx context.Context, conn *pgx.Conn)

versions, err := dbsqlc.New().AllExistingMigrationVersions(ctx, conn, m.registry.Namespace)
if err != nil {
return nil, fmt.Errorf("conduit: failed to fetch existing versions", err)
return nil, fmt.Errorf("conduit: failed to fetch existing versions: %w", err)
}

return versions, nil
Expand Down

0 comments on commit 1af6bb4

Please sign in to comment.