From 9792cca7a81dbe31b12b776d836ba69f4530fe95 Mon Sep 17 00:00:00 2001 From: Jorge Rojas Date: Sun, 8 Sep 2024 12:34:06 -0400 Subject: [PATCH] chore: make constants private --- components/ConnectionForm.go | 8 ++-- components/ConnectionPage.go | 4 +- components/ConnectionSelection.go | 12 +++--- components/HelpModal.go | 2 +- components/Home.go | 30 +++++++-------- components/Pages.go | 2 +- components/ResultTableFilter.go | 2 +- components/ResultsTable.go | 50 ++++++++++++------------- components/ResultsTableMenu.go | 16 ++++---- components/SQLEditor.go | 4 +- components/Sidebar.go | 10 ++--- components/Tree.go | 6 +-- components/constants.go | 62 +++++++++++++++---------------- 13 files changed, 104 insertions(+), 104 deletions(-) diff --git a/components/ConnectionForm.go b/components/ConnectionForm.go index 127769c..a6a1ac3 100644 --- a/components/ConnectionForm.go +++ b/components/ConnectionForm.go @@ -77,7 +77,7 @@ func NewConnectionForm(connectionPages *models.ConnectionPages) *ConnectionForm func (form *ConnectionForm) inputCapture(connectionPages *models.ConnectionPages) func(event *tcell.EventKey) *tcell.EventKey { return func(event *tcell.EventKey) *tcell.EventKey { if event.Key() == tcell.KeyEsc { - connectionPages.SwitchToPage(ConnectionsPageName) + connectionPages.SwitchToPage(connectionsPageName) } else if event.Key() == tcell.KeyF1 || event.Key() == tcell.KeyEnter { connectionName := form.GetFormItem(0).(*tview.InputField).GetText() @@ -111,7 +111,7 @@ func (form *ConnectionForm) inputCapture(connectionPages *models.ConnectionPages } switch form.Action { - case NewConnection: + case newConnection: newDatabases = append(databases, parsedDatabaseData) err := helpers.SaveConnectionConfig(newDatabases) @@ -120,7 +120,7 @@ func (form *ConnectionForm) inputCapture(connectionPages *models.ConnectionPages return event } - case EditConnection: + case editConnection: newDatabases = make([]models.Connection, len(databases)) row, _ := ConnectionListTable.GetSelection() @@ -151,7 +151,7 @@ func (form *ConnectionForm) inputCapture(connectionPages *models.ConnectionPages } ConnectionListTable.SetConnections(newDatabases) - connectionPages.SwitchToPage(ConnectionsPageName) + connectionPages.SwitchToPage(connectionsPageName) } else if event.Key() == tcell.KeyF2 { connectionString := form.GetFormItem(1).(*tview.InputField).GetText() diff --git a/components/ConnectionPage.go b/components/ConnectionPage.go index aca3c33..6656dd5 100644 --- a/components/ConnectionPage.go +++ b/components/ConnectionPage.go @@ -32,8 +32,8 @@ func NewConnectionPages() *models.ConnectionPages { connectionForm := NewConnectionForm(cp) connectionSelection := NewConnectionSelection(connectionForm, cp) - cp.AddPage(ConnectionsSelectionPageName, connectionSelection.Flex, true, true) - cp.AddPage(ConnectionsFormPageName, connectionForm.Flex, true, false) + cp.AddPage(connectionsSelectionPageName, connectionSelection.Flex, true, true) + cp.AddPage(connectionsFormPageName, connectionForm.Flex, true, false) return cp } diff --git a/components/ConnectionSelection.go b/components/ConnectionSelection.go index 6c9232b..9de76d2 100644 --- a/components/ConnectionSelection.go +++ b/components/ConnectionSelection.go @@ -88,18 +88,18 @@ func NewConnectionSelection(connectionForm *ConnectionForm, connectionPages *mod case commands.Connect: go cs.Connect(selectedConnection) case commands.EditConnection: - connectionPages.SwitchToPage(ConnectionsFormPageName) + connectionPages.SwitchToPage(connectionsFormPageName) connectionForm.GetFormItemByLabel("Name").(*tview.InputField).SetText(selectedConnection.Name) connectionForm.GetFormItemByLabel("URL").(*tview.InputField).SetText(selectedConnection.URL) connectionForm.StatusText.SetText("") - connectionForm.SetAction(EditConnection) + connectionForm.SetAction(editConnection) return nil case commands.DeleteConnection: confirmationModal := NewConfirmationModal("") confirmationModal.SetDoneFunc(func(_ int, buttonLabel string) { - MainPages.RemovePage(ConfirmationPageName) + MainPages.RemovePage(confirmationPageName) confirmationModal = nil if buttonLabel == "Yes" { @@ -115,7 +115,7 @@ func NewConnectionSelection(connectionForm *ConnectionForm, connectionPages *mod } }) - MainPages.AddPage(ConfirmationPageName, confirmationModal, true, true) + MainPages.AddPage(confirmationPageName, confirmationModal, true, true) return nil } @@ -123,11 +123,11 @@ func NewConnectionSelection(connectionForm *ConnectionForm, connectionPages *mod switch command { case commands.NewConnection: - connectionForm.SetAction(NewConnection) + connectionForm.SetAction(newConnection) connectionForm.GetFormItemByLabel("Name").(*tview.InputField).SetText("") connectionForm.GetFormItemByLabel("URL").(*tview.InputField).SetText("") connectionForm.StatusText.SetText("") - connectionPages.SwitchToPage(ConnectionsFormPageName) + connectionPages.SwitchToPage(connectionsFormPageName) case commands.Quit: if wrapper.HasFocus() { app.App.Stop() diff --git a/components/HelpModal.go b/components/HelpModal.go index f6e905f..baec49f 100644 --- a/components/HelpModal.go +++ b/components/HelpModal.go @@ -75,7 +75,7 @@ func NewHelpModal() *HelpModal { table.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey { command := app.Keymaps.Group(app.HomeGroup).Resolve(event) if command == commands.Quit || command == commands.HelpPopup { - MainPages.RemovePage(HelpPageName) + MainPages.RemovePage(helpPageName) } return event }) diff --git a/components/Home.go b/components/Home.go index 1226b98..9e6da5e 100644 --- a/components/Home.go +++ b/components/Home.go @@ -66,7 +66,7 @@ func NewHomePage(connection models.Connection, dbdriver drivers.Driver) *Home { home.SetInputCapture(home.homeInputCapture) home.SetFocusFunc(func() { - if home.FocusedWrapper == FocusedWrapperLeft || home.FocusedWrapper == "" { + if home.FocusedWrapper == focusedWrapperLeft || home.FocusedWrapper == "" { home.focusLeftWrapper() } else { home.focusRightWrapper() @@ -82,7 +82,7 @@ func (home *Home) subscribeToTreeChanges() { for stateChange := range ch { switch stateChange.Key { - case SelectedTableTree: + case selectedTableTree: databaseName := home.Tree.GetSelectedDatabase() tableName := stateChange.Value.(string) @@ -117,7 +117,7 @@ func (home *Home) subscribeToTreeChanges() { } app.App.ForceDraw() - case IsFilteringTree: + case isFilteringTree: isFiltering := stateChange.Value.(bool) if isFiltering { home.SetInputCapture(nil) @@ -140,7 +140,7 @@ func (home *Home) focusRightWrapper() { home.focusTab(tab) } - home.FocusedWrapper = FocusedWrapperRight + home.FocusedWrapper = focusedWrapperRight } func (home *Home) focusTab(tab *Tab) { @@ -166,7 +166,7 @@ func (home *Home) focusTab(tab *Tab) { App.SetFocus(table) } - if tab.Name == EditorTabName { + if tab.Name == editorTabName { home.HelpStatus.SetStatusOnEditorView() } else { home.HelpStatus.SetStatusOnTableView() @@ -193,7 +193,7 @@ func (home *Home) focusLeftWrapper() { App.SetFocus(home.Tree) - home.FocusedWrapper = FocusedWrapperLeft + home.FocusedWrapper = focusedWrapperLeft } func (home *Home) rightWrapperInputCapture(event *tcell.EventKey) *tcell.EventKey { @@ -272,22 +272,22 @@ func (home *Home) homeInputCapture(event *tcell.EventKey) *tcell.EventKey { switch command { case commands.MoveLeft: - if table != nil && !table.GetIsEditing() && !table.GetIsFiltering() && home.FocusedWrapper == FocusedWrapperRight { + if table != nil && !table.GetIsEditing() && !table.GetIsFiltering() && home.FocusedWrapper == focusedWrapperRight { home.focusLeftWrapper() } case commands.MoveRight: - if table != nil && !table.GetIsEditing() && !table.GetIsFiltering() && home.FocusedWrapper == FocusedWrapperLeft { + if table != nil && !table.GetIsEditing() && !table.GetIsFiltering() && home.FocusedWrapper == focusedWrapperLeft { home.focusRightWrapper() } case commands.SwitchToEditorView: - tab := home.TabbedPane.GetTabByName(EditorTabName) + tab := home.TabbedPane.GetTabByName(editorTabName) if tab != nil { - home.TabbedPane.SwitchToTabByName(EditorTabName) + home.TabbedPane.SwitchToTabByName(editorTabName) tab.Content.SetIsFiltering(true) } else { tableWithEditor := NewResultsTable(&home.ListOfDbChanges, home.Tree, home.DBDriver).WithEditor() - home.TabbedPane.AppendTab(EditorTabName, tableWithEditor, EditorTabName) + home.TabbedPane.AppendTab(editorTabName, tableWithEditor, editorTabName) tableWithEditor.SetIsFiltering(true) } home.HelpStatus.SetStatusOnEditorView() @@ -295,7 +295,7 @@ func (home *Home) homeInputCapture(event *tcell.EventKey) *tcell.EventKey { App.ForceDraw() case commands.SwitchToConnectionsView: if (table != nil && !table.GetIsEditing() && !table.GetIsFiltering() && !table.GetIsLoading()) || table == nil { - MainPages.SwitchToPage(ConnectionsPageName) + MainPages.SwitchToPage(connectionsPageName) } case commands.Quit: if tab != nil { @@ -312,7 +312,7 @@ func (home *Home) homeInputCapture(event *tcell.EventKey) *tcell.EventKey { confirmationModal := NewConfirmationModal("") confirmationModal.SetDoneFunc(func(_ int, buttonLabel string) { - MainPages.RemovePage(ConfirmationPageName) + MainPages.RemovePage(confirmationPageName) confirmationModal = nil if buttonLabel == "Yes" { @@ -332,7 +332,7 @@ func (home *Home) homeInputCapture(event *tcell.EventKey) *tcell.EventKey { } }) - MainPages.AddPage(ConfirmationPageName, confirmationModal, true, true) + MainPages.AddPage(confirmationPageName, confirmationModal, true, true) } case commands.HelpPopup: if table == nil || !table.GetIsEditing() { @@ -345,7 +345,7 @@ func (home *Home) homeInputCapture(event *tcell.EventKey) *tcell.EventKey { // } // return event // }) - MainPages.AddPage(HelpPageName, home.HelpModal, true, true) + MainPages.AddPage(helpPageName, home.HelpModal, true, true) } } diff --git a/components/Pages.go b/components/Pages.go index 2055685..c09aa87 100644 --- a/components/Pages.go +++ b/components/Pages.go @@ -8,5 +8,5 @@ var MainPages = tview.NewPages() func init() { MainPages.SetBackgroundColor(tview.Styles.PrimitiveBackgroundColor) - MainPages.AddPage(ConnectionsPageName, NewConnectionPages().Flex, true, true) + MainPages.AddPage(connectionsPageName, NewConnectionPages().Flex, true, true) } diff --git a/components/ResultTableFilter.go b/components/ResultTableFilter.go index f9e8bf5..1a1dcdb 100644 --- a/components/ResultTableFilter.go +++ b/components/ResultTableFilter.go @@ -67,7 +67,7 @@ func (filter *ResultsTableFilter) Subscribe() chan models.StateChange { func (filter *ResultsTableFilter) Publish(message string) { for _, sub := range filter.subscribers { sub <- models.StateChange{ - Key: FilteringResultsTable, + Key: filteringResultsTable, Value: message, } } diff --git a/components/ResultsTable.go b/components/ResultsTable.go index c547518..4c06654 100644 --- a/components/ResultsTable.go +++ b/components/ResultsTable.go @@ -89,9 +89,9 @@ func NewResultsTable(listOfDbChanges *[]models.DbDmlChange, tree *Tree, dbdriver loadingModal.SetTextColor(tview.Styles.SecondaryTextColor) pages := tview.NewPages() - pages.AddPage(TablePageName, wrapper, true, true) - pages.AddPage(TableErrorPageName, errorModal, true, false) - pages.AddPage(TableLoadingPageName, loadingModal, false, false) + pages.AddPage(tablePageName, wrapper, true, true) + pages.AddPage(tableErrorPageName, errorModal, true, false) + pages.AddPage(tableLoadingPageName, loadingModal, false, false) pagination := NewPagination() @@ -116,7 +116,7 @@ func NewResultsTable(listOfDbChanges *[]models.DbDmlChange, tree *Tree, dbdriver table.SetFixed(1, 0) table.SetInputCapture(table.tableInputCapture) table.SetSelectedStyle(tcell.StyleDefault.Background(tview.Styles.SecondaryTextColor).Foreground(tview.Styles.ContrastSecondaryTextColor)) - table.Page.AddPage(SidebarPageName, table.Sidebar, false, false) + table.Page.AddPage(sidebarPageName, table.Sidebar, false, false) table.SetSelectionChangedFunc(func(_, _ int) { if table.GetShowSidebar() { @@ -176,8 +176,8 @@ func (table *ResultsTable) WithEditor() *ResultsTable { resultsInfoText.SetTextColor(tview.Styles.PrimaryTextColor) resultsInfoWrapper.AddItem(resultsInfoText, 3, 0, false) - editorPages.AddPage(TableEditorTablePageName, tableWrapper, true, false) - editorPages.AddPage(TableEditorResultsInfoPageName, resultsInfoWrapper, true, true) + editorPages.AddPage(tableEditorTablePageName, tableWrapper, true, false) + editorPages.AddPage(tableEditorResultsInfoPageName, resultsInfoWrapper, true, true) table.EditorPages = editorPages table.ResultsInfo = resultsInfoText @@ -193,7 +193,7 @@ func (table *ResultsTable) subscribeToTreeChanges() { ch := table.Tree.Subscribe() for stateChange := range ch { - if stateChange.Key == SelectedDatabaseTree { + if stateChange.Key == selectedDatabaseTree { table.SetDatabaseName(stateChange.Value.(string)) } } @@ -204,13 +204,13 @@ func (table *ResultsTable) subscribeToSidebarChanges() { for stateChange := range ch { switch stateChange.Key { - case EditingSidebar: + case editingSidebar: editing := stateChange.Value.(bool) table.SetIsEditing(editing) - case UnfocusingSidebar: + case unfocusingSidebar: App.SetFocus(table) App.ForceDraw() - case TogglingSidebar: + case togglingSidebar: table.ShowSidebar(false) App.ForceDraw() } @@ -493,7 +493,7 @@ func (table *ResultsTable) subscribeToFilterChanges() { for stateChange := range ch { switch stateChange.Key { - case FilteringResultsTable: + case filteringResultsTable: if stateChange.Value != "" { rows := table.FetchRecords(nil) @@ -532,7 +532,7 @@ func (table *ResultsTable) subscribeToEditorChanges() { for stateChange := range ch { switch stateChange.Key { - case QuerySQLEditor: + case querySQLEditor: query := stateChange.Value.(string) if query != "" { queryLower := strings.ToLower(query) @@ -568,7 +568,7 @@ func (table *ResultsTable) subscribeToEditorChanges() { } table.SetLoading(false) } - table.EditorPages.SwitchToPage(TablePageName) + table.EditorPages.SwitchToPage(tablePageName) App.Draw() } else { table.SetRecords([][]string{}) @@ -584,13 +584,13 @@ func (table *ResultsTable) subscribeToEditorChanges() { } else { table.SetResultsInfo(result) table.SetLoading(false) - table.EditorPages.SwitchToPage(TableEditorResultsInfoPageName) + table.EditorPages.SwitchToPage(tableEditorResultsInfoPageName) App.SetFocus(table.Editor) App.Draw() } } } - case EscapeSQLEditor: + case escapeSQLEditor: table.SetIsFiltering(false) App.SetFocus(table) table.HighlightTable() @@ -704,7 +704,7 @@ func (table *ResultsTable) SetError(err string, done func()) { table.Error.SetText(err) table.Error.SetDoneFunc(func(_ int, _ string) { table.state.error = "" - table.Page.HidePage(TableErrorPageName) + table.Page.HidePage(tableErrorPageName) if table.GetIsFiltering() { if table.Editor != nil { App.SetFocus(table.Editor) @@ -718,7 +718,7 @@ func (table *ResultsTable) SetError(err string, done func()) { done() } }) - table.Page.ShowPage(TableErrorPageName) + table.Page.ShowPage(tableErrorPageName) App.SetFocus(table.Error) App.ForceDraw() } @@ -731,7 +731,7 @@ func (table *ResultsTable) SetLoading(show bool) { defer func() { if r := recover(); r != nil { logger.Error("ResultsTable.go:800 => Recovered from panic", map[string]any{"error": r}) - _ = table.Page.HidePage(TableLoadingPageName) + _ = table.Page.HidePage(tableLoadingPageName) if table.state.error != "" { App.SetFocus(table.Error) } else { @@ -742,11 +742,11 @@ func (table *ResultsTable) SetLoading(show bool) { table.state.isLoading = show if show { - table.Page.ShowPage(TableLoadingPageName) + table.Page.ShowPage(tableLoadingPageName) App.SetFocus(table.Loading) App.ForceDraw() } else { - table.Page.HidePage(TableLoadingPageName) + table.Page.HidePage(tableLoadingPageName) if table.state.error != "" { App.SetFocus(table.Error) } else { @@ -909,7 +909,7 @@ func (table *ResultsTable) StartEditingCell(row int, col int, callback func(newV if key == tcell.KeyEnter || key == tcell.KeyEscape { table.SetInputCapture(table.tableInputCapture) - table.Page.RemovePage(TableEditCellPageName) + table.Page.RemovePage(tableEditCellPageName) App.SetFocus(table) } @@ -920,7 +920,7 @@ func (table *ResultsTable) StartEditingCell(row int, col int, callback func(newV x, y, width := cell.GetLastPosition() inputField.SetRect(x, y, width+1, 1) - table.Page.AddPage(TableEditCellPageName, inputField, false, true) + table.Page.AddPage(tableEditCellPageName, inputField, false, true) App.SetFocus(inputField) } @@ -1271,10 +1271,10 @@ func (table *ResultsTable) ShowSidebar(show bool) { if show { table.UpdateSidebar() - table.Page.SendToFront(SidebarPageName) - table.Page.ShowPage(SidebarPageName) + table.Page.SendToFront(sidebarPageName) + table.Page.ShowPage(sidebarPageName) } else { - table.Page.HidePage(SidebarPageName) + table.Page.HidePage(sidebarPageName) App.SetFocus(table) } } diff --git a/components/ResultsTableMenu.go b/components/ResultsTableMenu.go index 858d270..2d7f9cc 100644 --- a/components/ResultsTableMenu.go +++ b/components/ResultsTableMenu.go @@ -17,11 +17,11 @@ type ResultsTableMenu struct { } var menuItems = []string{ - RecordsMenu, - ColumnsMenu, - ConstraintsMenu, - ForeignKeysMenu, - IndexesMenu, + recordsMenu, + columnsMenu, + constraintsMenu, + foreignKeysMenu, + indexesMenu, } func NewResultsTableMenu() *ResultsTableMenu { @@ -52,11 +52,11 @@ func NewResultsTableMenu() *ResultsTableMenu { size := 15 switch item { - case ConstraintsMenu: + case constraintsMenu: size = 19 - case ForeignKeysMenu: + case foreignKeysMenu: size = 20 - case IndexesMenu: + case indexesMenu: size = 16 } diff --git a/components/SQLEditor.go b/components/SQLEditor.go index dc18426..2f66f82 100644 --- a/components/SQLEditor.go +++ b/components/SQLEditor.go @@ -38,10 +38,10 @@ func NewSQLEditor() *SQLEditor { command := app.Keymaps.Group(app.EditorGroup).Resolve(event) if command == commands.Execute { - sqlEditor.Publish(QuerySQLEditor, sqlEditor.GetText()) + sqlEditor.Publish(querySQLEditor, sqlEditor.GetText()) return nil } else if command == commands.UnfocusEditor { - sqlEditor.Publish(EscapeSQLEditor, "") + sqlEditor.Publish(escapeSQLEditor, "") } else if command == commands.OpenInExternalEditor && runtime.GOOS == "linux" { // ----- THIS IS A LINUX-ONLY FEATURE, for now diff --git a/components/Sidebar.go b/components/Sidebar.go index 2fe5ebb..eea2558 100644 --- a/components/Sidebar.go +++ b/components/Sidebar.go @@ -140,9 +140,9 @@ func (sidebar *Sidebar) inputCapture(event *tcell.EventKey) *tcell.EventKey { switch command { case commands.UnfocusSidebar: - sidebar.Publish(models.StateChange{Key: UnfocusingSidebar, Value: nil}) + sidebar.Publish(models.StateChange{Key: unfocusingSidebar, Value: nil}) case commands.ToggleSidebar: - sidebar.Publish(models.StateChange{Key: TogglingSidebar, Value: nil}) + sidebar.Publish(models.StateChange{Key: togglingSidebar, Value: nil}) case commands.MoveDown: sidebar.FocusNextField() case commands.MoveUp: @@ -152,7 +152,7 @@ func (sidebar *Sidebar) inputCapture(event *tcell.EventKey) *tcell.EventKey { case commands.GotoEnd: sidebar.FocusLastField() case commands.Edit: - sidebar.Publish(models.StateChange{Key: EditingSidebar, Value: true}) + sidebar.Publish(models.StateChange{Key: editingSidebar, Value: true}) currentItemIndex := sidebar.GetCurrentFieldIndex() item := sidebar.Fields[currentItemIndex] @@ -165,13 +165,13 @@ func (sidebar *Sidebar) inputCapture(event *tcell.EventKey) *tcell.EventKey { case commands.CommitEdit: sidebar.SetInputCapture(sidebar.inputCapture) sidebar.SetDisabledStyles(item) - sidebar.Publish(models.StateChange{Key: EditingSidebar, Value: false}) + sidebar.Publish(models.StateChange{Key: editingSidebar, Value: false}) return nil case commands.DiscardEdit: sidebar.SetInputCapture(sidebar.inputCapture) sidebar.SetDisabledStyles(item) item.SetText(text, true) - sidebar.Publish(models.StateChange{Key: EditingSidebar, Value: false}) + sidebar.Publish(models.StateChange{Key: editingSidebar, Value: false}) return nil } diff --git a/components/Tree.go b/components/Tree.go index 0c5148e..97327dd 100644 --- a/components/Tree.go +++ b/components/Tree.go @@ -388,7 +388,7 @@ func (tree *Tree) GetIsFiltering() bool { func (tree *Tree) SetSelectedDatabase(database string) { tree.state.selectedDatabase = database tree.Publish(models.StateChange{ - Key: SelectedDatabaseTree, + Key: selectedDatabaseTree, Value: database, }) } @@ -396,7 +396,7 @@ func (tree *Tree) SetSelectedDatabase(database string) { func (tree *Tree) SetSelectedTable(table string) { tree.state.selectedTable = table tree.Publish(models.StateChange{ - Key: SelectedTableTree, + Key: selectedTableTree, Value: table, }) } @@ -404,7 +404,7 @@ func (tree *Tree) SetSelectedTable(table string) { func (tree *Tree) SetIsFiltering(isFiltering bool) { tree.state.isFiltering = isFiltering tree.Publish(models.StateChange{ - Key: IsFilteringTree, + Key: isFilteringTree, Value: isFiltering, }) } diff --git a/components/constants.go b/components/constants.go index 334ca8b..4589195 100644 --- a/components/constants.go +++ b/components/constants.go @@ -7,64 +7,64 @@ var App = app.App // Pages const ( // General - HelpPageName string = "Help" - ConfirmationPageName string = "Confirmation" - ConnectionsPageName string = "Connections" + helpPageName string = "Help" + confirmationPageName string = "Confirmation" + connectionsPageName string = "Connections" // Results table - TablePageName string = "Table" - TableErrorPageName string = "TableError" - TableLoadingPageName string = "TableLoading" - TableEditorTablePageName string = "TableEditorTable" - TableEditorResultsInfoPageName string = "TableEditorResultsInfo" - TableEditCellPageName string = "TableEditCell" + tablePageName string = "Table" + tableErrorPageName string = "TableError" + tableLoadingPageName string = "TableLoading" + tableEditorTablePageName string = "TableEditorTable" + tableEditorResultsInfoPageName string = "TableEditorResultsInfo" + tableEditCellPageName string = "TableEditCell" // Sidebar - SidebarPageName string = "Sidebar" + sidebarPageName string = "Sidebar" // Connections - ConnectionsSelectionPageName string = "ConnectionsSelection" - ConnectionsFormPageName string = "ConnectionsForm" + connectionsSelectionPageName string = "ConnectionsSelection" + connectionsFormPageName string = "ConnectionsForm" ) // Tabs const ( - EditorTabName string = "Editor" + editorTabName string = "Editor" ) // Events const ( - EditingSidebar string = "EditingSidebar" - UnfocusingSidebar string = "UnfocusingSidebar" - TogglingSidebar string = "TogglingSidebar" + editingSidebar string = "EditingSidebar" + unfocusingSidebar string = "UnfocusingSidebar" + togglingSidebar string = "TogglingSidebar" - QuerySQLEditor string = "Query" - EscapeSQLEditor string = "Escape" + querySQLEditor string = "Query" + escapeSQLEditor string = "Escape" - FilteringResultsTable string = "FilteringResultsTable" + filteringResultsTable string = "FilteringResultsTable" - SelectedDatabaseTree string = "SelectedDatabase" - SelectedTableTree string = "SelectedTable" - IsFilteringTree string = "IsFiltering" + selectedDatabaseTree string = "SelectedDatabase" + selectedTableTree string = "SelectedTable" + isFilteringTree string = "IsFiltering" ) // Results table menu items const ( - RecordsMenu string = "Records" - ColumnsMenu string = "Columns" - ConstraintsMenu string = "Constraints" - ForeignKeysMenu string = "Foreign Keys" - IndexesMenu string = "Indexes" + recordsMenu string = "Records" + columnsMenu string = "Columns" + constraintsMenu string = "Constraints" + foreignKeysMenu string = "Foreign Keys" + indexesMenu string = "Indexes" ) // Actions const ( - NewConnection string = "NewConnection" - EditConnection string = "EditConnection" + newConnection string = "NewConnection" + editConnection string = "EditConnection" ) // Misc (until i find a better name) const ( - FocusedWrapperLeft string = "left" - FocusedWrapperRight string = "right" + focusedWrapperLeft string = "left" + focusedWrapperRight string = "right" )