diff options
author | salaaad2 <arthurdurant263@gmail.com> | 2022-04-19 21:58:23 +0200 |
---|---|---|
committer | salaaad2 <arthurdurant263@gmail.com> | 2022-04-19 21:58:23 +0200 |
commit | 57440c5f840dd5d4dadd80f69467a3b1450e6027 (patch) | |
tree | 032b6a106abe534f2e9cb27deb653525bf42a34c /gosrc/main.go | |
parent | refactor, readme, gui hooks, and more (diff) | |
download | smith-57440c5f840dd5d4dadd80f69467a3b1450e6027.tar.gz smith-57440c5f840dd5d4dadd80f69467a3b1450e6027.tar.bz2 smith-57440c5f840dd5d4dadd80f69467a3b1450e6027.tar.xz smith-57440c5f840dd5d4dadd80f69467a3b1450e6027.tar.zst smith-57440c5f840dd5d4dadd80f69467a3b1450e6027.zip |
improve response display, now with 400% more unmarshalling (smith_v_0.1.0)
Diffstat (limited to 'gosrc/main.go')
-rw-r--r-- | gosrc/main.go | 7 |
1 files changed, 3 insertions, 4 deletions
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() } } |