gofmt.
This commit is contained in:
parent
39ac02dfc5
commit
2b3c9ef9ea
@ -39,17 +39,50 @@ INSERT INTO database (version) VALUES (1);
|
||||
// Migrate database to latest version.
|
||||
// ToDo: make it more good :).
|
||||
func migrate_full(db *Database, version int) {
|
||||
if version < 1 {start_to_one(db); version = 1}
|
||||
if version == 1 {one_to_two(db); version = 2}
|
||||
if version == 2 {two_to_three(db); version = 3}
|
||||
if version == 3 {three_to_four(db); version = 4}
|
||||
if version == 4 {four_to_five(db); version = 5}
|
||||
if version == 5 {five_to_six(db); version = 6 }
|
||||
if version == 6 {six_to_seven(db); version = 7}
|
||||
if version == 7 {seven_to_eight(db); version = 8}
|
||||
if version == 8 {eight_to_nine(db); version = 9}
|
||||
if version == 9 {nine_to_ten(db); version = 10}
|
||||
if version == 10 {ten_to_eleven(db); version = 11}
|
||||
if version < 1 {
|
||||
start_to_one(db)
|
||||
version = 1
|
||||
}
|
||||
if version == 1 {
|
||||
one_to_two(db)
|
||||
version = 2
|
||||
}
|
||||
if version == 2 {
|
||||
two_to_three(db)
|
||||
version = 3
|
||||
}
|
||||
if version == 3 {
|
||||
three_to_four(db)
|
||||
version = 4
|
||||
}
|
||||
if version == 4 {
|
||||
four_to_five(db)
|
||||
version = 5
|
||||
}
|
||||
if version == 5 {
|
||||
five_to_six(db)
|
||||
version = 6
|
||||
}
|
||||
if version == 6 {
|
||||
six_to_seven(db)
|
||||
version = 7
|
||||
}
|
||||
if version == 7 {
|
||||
seven_to_eight(db)
|
||||
version = 8
|
||||
}
|
||||
if version == 8 {
|
||||
eight_to_nine(db)
|
||||
version = 9
|
||||
}
|
||||
if version == 9 {
|
||||
nine_to_ten(db)
|
||||
version = 10
|
||||
}
|
||||
if version == 10 {
|
||||
ten_to_eleven(db)
|
||||
version = 11
|
||||
}
|
||||
}
|
||||
|
||||
// Initial database structure.
|
||||
|
@ -24,8 +24,8 @@ package translator
|
||||
import (
|
||||
// stdlib
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"os"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
// Detect language on Windows.
|
||||
|
@ -107,7 +107,6 @@ func (m *MainWindow) showAboutQtDialog(a bool) {
|
||||
widgets.QMessageBox_AboutQt(m.window, "About Qt")
|
||||
}
|
||||
|
||||
|
||||
func (m *MainWindow) showOptionsDialog(a bool) {
|
||||
fmt.Println("Showing options dialog...")
|
||||
}
|
||||
|
Reference in New Issue
Block a user