From 57440c5f840dd5d4dadd80f69467a3b1450e6027 Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Tue, 19 Apr 2022 21:58:23 +0200 Subject: improve response display, now with 400% more unmarshalling (smith_v_0.1.0) --- gosrc/main.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'gosrc/main.go') diff --git a/gosrc/main.go b/gosrc/main.go index 58ecfe6..edc3033 100644 --- a/gosrc/main.go +++ b/gosrc/main.go @@ -8,7 +8,6 @@ package main import ( "encoding/json" - "io" "io/ioutil" "log" "os" @@ -103,7 +102,8 @@ func ui_loop(config Config) error { p1.Border = true p2.Border = true - output.Border = false + output.Border = true + output.TextStyle.Fg = ui.ColorGreen p1.Title = "Active Mirror" p2.Title = "Balance" @@ -160,8 +160,7 @@ func ui_loop(config Config) error { if rep == nil || err != nil { output.Text = "something went wrong :^{" } else { - body, _ := io.ReadAll(rep.Body) - output.Text = string(body) + displayResponse(l.SelectedNode().Value.String(), rep, &output.Text) defer rep.Body.Close() } } -- cgit v1.2.3