From 15ef2bcb6e6b6f38de5519dff5e57c6480373b00 Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Wed, 15 Mar 2023 01:01:38 +0100 Subject: [PATCH] chore: fix comment typos (#480) --- goose_test.go | 4 ++-- internal/migrationstats/migration_go.go | 2 +- migrate.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/goose_test.go b/goose_test.go index 422d3b0..f449d5b 100644 --- a/goose_test.go +++ b/goose_test.go @@ -136,7 +136,7 @@ func TestCustomBinary(t *testing.T) { } t.Cleanup(func() { if err := os.Remove("./go.db"); err != nil { - t.Logf("failed to remove %s resouces: %v", t.Name(), err) + t.Logf("failed to remove %s resources: %v", t.Name(), err) } }) @@ -160,7 +160,7 @@ func TestEmbeddedMigrations(t *testing.T) { } t.Cleanup(func() { if err := os.Remove("./sql_embed.db"); err != nil { - t.Logf("failed to remove %s resouces: %v", t.Name(), err) + t.Logf("failed to remove %s resources: %v", t.Name(), err) } }) diff --git a/internal/migrationstats/migration_go.go b/internal/migrationstats/migration_go.go index 0a15037..ad8d57d 100644 --- a/internal/migrationstats/migration_go.go +++ b/internal/migrationstats/migration_go.go @@ -91,7 +91,7 @@ func parseInitFunc(fd *ast.FuncDecl) (*goMigration, error) { getNameFromExpr := func(expr ast.Expr) (string, error) { arg, ok := expr.(*ast.Ident) if !ok { - return "", fmt.Errorf("failed to assert argument identifer: got %T", arg) + return "", fmt.Errorf("failed to assert argument identifier: got %T", arg) } return arg.Name, nil } diff --git a/migrate.go b/migrate.go index 63faaee..baf6680 100644 --- a/migrate.go +++ b/migrate.go @@ -86,7 +86,7 @@ func (ms Migrations) versioned() (Migrations, error) { // assume that the user will never have more than 19700101000000 migrations for _, m := range ms { - // parse version as timestmap + // parse version as timestamp versionTime, err := time.Parse(timestampFormat, fmt.Sprintf("%d", m.Version)) if versionTime.Before(time.Unix(0, 0)) || err != nil { @@ -103,7 +103,7 @@ func (ms Migrations) timestamped() (Migrations, error) { // assume that the user will never have more than 19700101000000 migrations for _, m := range ms { - // parse version as timestmap + // parse version as timestamp versionTime, err := time.Parse(timestampFormat, fmt.Sprintf("%d", m.Version)) if err != nil { // probably not a timestamp