mirror of
https://github.com/lukaszraczylo/kportal.git
synced 2026-07-09 06:44:16 +00:00
chore: add golangci-lint v2 config and fix linter warnings (#46)
- [x] Add golangci-lint v2 configuration with formatters section - [x] Reorganize linters-settings under linters section - [x] Replace if-else chains with switch statements for clarity - [x] Wrap all ignored error returns with `_ = ` pattern - [x] Add OSC 8 hyperlink helper function for clickable ports - [x] Add blank line in table styling function - [x] Remove unnecessary type assertion in test
This commit is contained in:
@@ -856,11 +856,12 @@ func TestModel_Update_ViewModeRouting(t *testing.T) {
|
||||
ui := NewBubbleTeaUI(nil, "1.0.0")
|
||||
ui.mu.Lock()
|
||||
ui.viewMode = tt.viewMode
|
||||
if tt.viewMode == ViewModeAddWizard {
|
||||
switch tt.viewMode {
|
||||
case ViewModeAddWizard:
|
||||
ui.addWizard = newAddWizardState()
|
||||
} else if tt.viewMode == ViewModeBenchmark {
|
||||
case ViewModeBenchmark:
|
||||
ui.benchmarkState = newBenchmarkState("id", "alias", 8080)
|
||||
} else if tt.viewMode == ViewModeHTTPLog {
|
||||
case ViewModeHTTPLog:
|
||||
ui.httpLogState = newHTTPLogState("id", "alias")
|
||||
}
|
||||
ui.mu.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user