mirror of
https://github.com/lukaszraczylo/kportal.git
synced 2026-06-30 05:44:37 +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:
+3
-2
@@ -347,10 +347,11 @@ func main() {
|
||||
}
|
||||
|
||||
// Populate headers based on direction
|
||||
if entry.Direction == "request" {
|
||||
switch entry.Direction {
|
||||
case "request":
|
||||
uiEntry.RequestHeaders = entry.Headers
|
||||
uiEntry.RequestBody = entry.Body
|
||||
} else if entry.Direction == "response" {
|
||||
case "response":
|
||||
uiEntry.ResponseHeaders = entry.Headers
|
||||
uiEntry.ResponseBody = entry.Body
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user