Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged

Fmt #189

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion database/clickhouse/clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ func (ch *ClickHouse) SetVersion(version int, dirty bool) error {
return tx.Commit()
}


// ensureVersionTable checks if versions table exists and, if not, creates it.
// Note that this function locks the database, which deviates from the usual
// convention of "caller locks" in the ClickHouse type.
Expand Down
1 change: 1 addition & 0 deletions database/ql/ql.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ func WithInstance(instance *sql.DB, config *Config) (database.Driver, error) {
}
return mx, nil
}

// ensureVersionTable checks if versions table exists and, if not, creates it.
// Note that this function locks the database, which deviates from the usual
// convention of "caller locks" in the Ql type.
Expand Down
2 changes: 1 addition & 1 deletion database/testing/migrate_testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ func TestMigrateUp(t *testing.T, m *migrate.Migrate) {
if err := m.Up(); err != nil {
t.Fatalf("%v", err)
}
}
}
2 changes: 1 addition & 1 deletion internal/cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Commands:
goto V Migrate to version V
up [N] Apply all or N up migrations
down [N] Apply all or N down migrations
drop Drop everyting inside database
drop Drop everything inside database
force V Set version V but don't run migration (ignores dirty state)
version Print current migration version

Expand Down
2 changes: 1 addition & 1 deletion source/godoc_vfs/vfs.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Package vfs contains a driver that reads migrations from a virtual file
// Package godoc_vfs contains a driver that reads migrations from a virtual file
// system.
//
// Implementations of the filesystem interface that read from zip files and
Expand Down
2 changes: 1 addition & 1 deletion source/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (i *Migrations) Append(m *Migration) (ok bool) {

func (i *Migrations) buildIndex() {
i.index = make(uintSlice, 0)
for version, _ := range i.migrations {
for version := range i.migrations {
i.index = append(i.index, version)
}
sort.Sort(i.index)
Expand Down
2 changes: 1 addition & 1 deletion util.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func NewMultiError(errs ...error) MultiError {
return MultiError{compactErrs}
}

// Error implements error. Mulitple errors are concatenated with 'and's.
// Error implements error. Multiple errors are concatenated with 'and's.
func (m MultiError) Error() string {
var strs = make([]string, 0)
for _, e := range m.Errs {
Expand Down