aboutsummaryrefslogtreecommitdiffstats
path: root/gosrc/main.go
diff options
context:
space:
mode:
authorsalaaad2 <arthurdurant263@gmail.com>2022-04-19 21:58:23 +0200
committersalaaad2 <arthurdurant263@gmail.com>2022-04-19 21:58:23 +0200
commit57440c5f840dd5d4dadd80f69467a3b1450e6027 (patch)
tree032b6a106abe534f2e9cb27deb653525bf42a34c /gosrc/main.go
parentrefactor, readme, gui hooks, and more (diff)
downloadsmith-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.go7
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()
}
}