mirror of https://github.com/pressly/goose.git
chore: fix comment typos (#480)
parent
c462979327
commit
15ef2bcb6e
|
@ -136,7 +136,7 @@ func TestCustomBinary(t *testing.T) {
|
||||||
}
|
}
|
||||||
t.Cleanup(func() {
|
t.Cleanup(func() {
|
||||||
if err := os.Remove("./go.db"); err != nil {
|
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() {
|
t.Cleanup(func() {
|
||||||
if err := os.Remove("./sql_embed.db"); err != nil {
|
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)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ func parseInitFunc(fd *ast.FuncDecl) (*goMigration, error) {
|
||||||
getNameFromExpr := func(expr ast.Expr) (string, error) {
|
getNameFromExpr := func(expr ast.Expr) (string, error) {
|
||||||
arg, ok := expr.(*ast.Ident)
|
arg, ok := expr.(*ast.Ident)
|
||||||
if !ok {
|
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
|
return arg.Name, nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ func (ms Migrations) versioned() (Migrations, error) {
|
||||||
|
|
||||||
// assume that the user will never have more than 19700101000000 migrations
|
// assume that the user will never have more than 19700101000000 migrations
|
||||||
for _, m := range ms {
|
for _, m := range ms {
|
||||||
// parse version as timestmap
|
// parse version as timestamp
|
||||||
versionTime, err := time.Parse(timestampFormat, fmt.Sprintf("%d", m.Version))
|
versionTime, err := time.Parse(timestampFormat, fmt.Sprintf("%d", m.Version))
|
||||||
|
|
||||||
if versionTime.Before(time.Unix(0, 0)) || err != nil {
|
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
|
// assume that the user will never have more than 19700101000000 migrations
|
||||||
for _, m := range ms {
|
for _, m := range ms {
|
||||||
// parse version as timestmap
|
// parse version as timestamp
|
||||||
versionTime, err := time.Parse(timestampFormat, fmt.Sprintf("%d", m.Version))
|
versionTime, err := time.Parse(timestampFormat, fmt.Sprintf("%d", m.Version))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// probably not a timestamp
|
// probably not a timestamp
|
||||||
|
|
Loading…
Reference in New Issue