MCPcopy
hub / github.com/qustavo/httplab / Info

Method Info

ui/ui.go:313–334  ·  view source on GitHub ↗

Info prints information on the InfoView.

(g *gocui.Gui, format string, args ...interface{})

Source from the content-addressed store, hash-verified

311
312// Info prints information on the InfoView.
313func (ui *UI) Info(g *gocui.Gui, format string, args ...interface{}) {
314 v, err := g.View(InfoView)
315 if v == nil || err != nil {
316 return
317 }
318
319 g.Update(func(g *gocui.Gui) error {
320 v.Clear()
321 _, err := fmt.Fprintf(v, format, args...)
322 return err
323 })
324
325 if ui.infoTimer != nil {
326 ui.infoTimer.Stop()
327 }
328 ui.infoTimer = time.AfterFunc(3*time.Second, func() {
329 g.Update(func(g *gocui.Gui) error {
330 v.Clear()
331 return nil
332 })
333 })
334}
335
336// Display displays arbitraty info into a given view.
337func (ui *UI) Display(g *gocui.Gui, view string, bytes []byte) error {

Callers 15

AddRequestMethod · 0.95
resetRequestsMethod · 0.95
updateResponseMethod · 0.95
restoreResponseMethod · 0.95
openSavePopupMethod · 0.95
saveResponseAsMethod · 0.95
saveRequestPopupMethod · 0.95
saveRequestAsMethod · 0.95
openBodyFilePopupMethod · 0.95
TestLoadFromJSONFunction · 0.45
NewHandlerFunction · 0.45
runFunction · 0.45

Calls

no outgoing calls

Tested by 1

TestLoadFromJSONFunction · 0.36