Skip to content

Commit

Permalink
fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
anilcse committed Dec 12, 2024
1 parent bb43ba6 commit 1a2cd88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
17 changes: 0 additions & 17 deletions internal/cosmos/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,20 +348,3 @@ func getActiveEndpoint(endpoints []RestEndpoint) string {

return ""
}

func isValidJSONResponse(resp *http.Response, body []byte) bool {
contentType := resp.Header.Get("Content-Type")
if !strings.Contains(strings.ToLower(contentType), "application/json") {
return false
}

// Check if the response looks like HTML
if strings.Contains(strings.ToLower(string(body)), "<!doctype html") ||
strings.Contains(strings.ToLower(string(body)), "<html") {
return false
}

// Try to parse as JSON
var js json.RawMessage
return json.Unmarshal(body, &js) == nil
}
6 changes: 4 additions & 2 deletions internal/portfolio/display.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ func PrintHeader() {
headerColor.Printf(" ║\n")
headerColor.Printf("║ %s", strings.Repeat(" ", 59))
headerColor.Println("║")
headerColor.Println("╚════════════════════════════════════════════════════════════╝\n")
headerColor.Println("╚════════════════════════════════════════════════════════════╝")
fmt.Println("")
}

func PrintFooter(balances []Balance) {
Expand All @@ -66,7 +67,8 @@ func PrintFooter(balances []Balance) {
headerColor.Printf(" ║\n")
headerColor.Printf("║ %s", strings.Repeat(" ", 59))
headerColor.Println("║")
headerColor.Println("╚════════════════════════════════════════════════════════════╝\n")
headerColor.Println("╚════════════════════════════════════════════════════════════╝")
fmt.Println("")
}

func printDetailedView(balances []Balance) {
Expand Down

0 comments on commit 1a2cd88

Please sign in to comment.