diff --git a/dialect/pgdialect/sqltype.go b/dialect/pgdialect/sqltype.go index 5f35a29ec..5675c9530 100644 --- a/dialect/pgdialect/sqltype.go +++ b/dialect/pgdialect/sqltype.go @@ -155,7 +155,7 @@ func (d *Dialect) CompareType(col1, col2 sqlschema.Column) bool { } // checkVarcharLen returns true if columns have the same VarcharLen, or, -// if one specifies no VarcharLen and the other one has the default lenght for pgdialect. +// if one specifies no VarcharLen and the other one has the default length for pgdialect. // We assume that the types are otherwise equivalent and that any non-character column // would have VarcharLen == 0; func checkVarcharLen(col1, col2 sqlschema.Column, defaultLen int) bool { diff --git a/extra/bunexp/resolver.go b/extra/bunexp/resolver.go index d9dbdb792..c6d785b99 100644 --- a/extra/bunexp/resolver.go +++ b/extra/bunexp/resolver.go @@ -26,7 +26,7 @@ var _ (bun.ConnResolver) = (*ReadWriteConnResolver)(nil) // TODO: // - make monitoring interval configurable -// - make ping timeout configutable +// - make ping timeout configurable // - allow adding read/write replicas for multi-master replication type ReadWriteConnResolver struct { rw replicas // for read-write queries diff --git a/internal/dbtest/migrate_test.go b/internal/dbtest/migrate_test.go index 9bf6e79ae..4562905cd 100644 --- a/internal/dbtest/migrate_test.go +++ b/internal/dbtest/migrate_test.go @@ -363,12 +363,12 @@ func newAutoMigratorOrSkip(tb testing.TB, db *bun.DB, opts ...migrate.AutoMigrat } // inspectDbOrSkip returns a function to inspect the current state of the database. -// The test will be *skipped* if the current dialect doesn't support database inpection +// The test will be *skipped* if the current dialect doesn't support database inspection // and fail if the inspector cannot successfully retrieve database state. func inspectDbOrSkip(tb testing.TB, db *bun.DB, options ...sqlschema.InspectorOption) func(context.Context) sqlschema.BaseDatabase { tb.Helper() - // By appending options to default options we make sure they can be overriden. + // By appending options to default options we make sure they can be overridden. // E.g. passing sqlschema.WithSchemaName("custom") sets migration schema to "custom". defaultOptions := []sqlschema.InspectorOption{ sqlschema.WithSchemaName(db.Dialect().DefaultSchema()), diff --git a/migrate/auto.go b/migrate/auto.go index 174a25649..0764be57e 100644 --- a/migrate/auto.go +++ b/migrate/auto.go @@ -40,7 +40,7 @@ func WithExcludeTable(tables ...string) AutoMigratorOption { } } -// WithExcludeForeignKeys tells AutoMigrator to exclude a foreign key constaint +// WithExcludeForeignKeys tells AutoMigrator to exclude a foreign key constraint // from the migration scope. This prevents AutoMigrator from dropping foreign keys // that are defined manually via CreateTableQuery.ForeignKey(). func WithExcludeForeignKeys(fks ...sqlschema.ForeignKey) AutoMigratorOption { diff --git a/migrate/operations.go b/migrate/operations.go index d82e02e97..7832b13bf 100644 --- a/migrate/operations.go +++ b/migrate/operations.go @@ -250,7 +250,7 @@ func (op *DropUniqueConstraintOp) GetReverse() Operation { // ChangeColumnTypeOp set a new data type for the column. // The two types should be such that the data can be auto-casted from one to another. -// E.g. reducing VARCHAR lenght is not possible in most dialects. +// E.g. reducing VARCHAR length is not possible in most dialects. // AutoMigrator does not enforce or validate these rules. type ChangeColumnTypeOp struct { TableName string diff --git a/migrate/sqlschema/database.go b/migrate/sqlschema/database.go index 0b7956ba1..53ef215ac 100644 --- a/migrate/sqlschema/database.go +++ b/migrate/sqlschema/database.go @@ -76,7 +76,7 @@ func (c *Columns) Split() []string { return strings.Split(c.String(), ",") } -// ContainsColumns checks that columns in "other" are a subset of current colums. +// ContainsColumns checks that columns in "other" are a subset of current columns. func (c *Columns) ContainsColumns(other Columns) bool { columns := c.Split() Outer: diff --git a/migrate/sqlschema/inspector.go b/migrate/sqlschema/inspector.go index cdf7d2753..47bbf3e7e 100644 --- a/migrate/sqlschema/inspector.go +++ b/migrate/sqlschema/inspector.go @@ -15,7 +15,7 @@ type InspectorDialect interface { // Inspector returns a new instance of Inspector for the dialect. // Dialects MAY set their default InspectorConfig values in constructor - // but MUST apply InspectorOptions to ensure they can be overriden. + // but MUST apply InspectorOptions to ensure they can be overridden. // // Use ApplyInspectorOptions to reduce boilerplate. NewInspector(db *bun.DB, options ...InspectorOption) Inspector diff --git a/migrate/sqlschema/migrator.go b/migrate/sqlschema/migrator.go index 8192bffe9..5ec9932a1 100644 --- a/migrate/sqlschema/migrator.go +++ b/migrate/sqlschema/migrator.go @@ -33,7 +33,7 @@ func NewMigrator(db *bun.DB, schemaName string) (Migrator, error) { }, nil } -// BaseMigrator can be embeded by dialect's Migrator implementations to re-use some of the existing bun queries. +// BaseMigrator can be embedded by dialect's Migrator implementations to re-use some of the existing bun queries. type BaseMigrator struct { db *bun.DB }