// Print prints json return func Print(v interface{}) { switch v.(type) { case []byte: fmt.Printf("%s", v) default: out, err := tat.Sprint(v) Check(err) fmt.Print(getJSON(out)) } }
func (ui *tatui) showMe() { ui.msg.Text = "" //body, err := internal.Request("GET", http.StatusOK, "/user/me", nil) body, err := internal.Client().UserMe() if err != nil { ui.msg.Text = err.Error() return } out, err := tat.Sprint(body) if err != nil { ui.msg.Text = err.Error() return } ui.showResult("tatcli user me -> GET on /user/me ", string(out)) }