MCPcopy Index your code
hub / github.com/git-bug/git-bug / toggleOpenClose

Method toggleOpenClose

termui/show_bug.go:626–637  ·  view source on GitHub ↗
(g *gocui.Gui, v *gocui.View)

Source from the content-addressed store, hash-verified

624}
625
626func (sb *showBug) toggleOpenClose(g *gocui.Gui, v *gocui.View) error {
627 switch sb.bug.Snapshot().Status {
628 case common.OpenStatus:
629 _, err := sb.bug.Close()
630 return err
631 case common.ClosedStatus:
632 _, err := sb.bug.Open()
633 return err
634 default:
635 return nil
636 }
637}
638
639func (sb *showBug) edit(g *gocui.Gui, v *gocui.View) error {
640 snap := sb.bug.Snapshot()

Callers

nothing calls this directly

Calls 3

SnapshotMethod · 0.80
CloseMethod · 0.65
OpenMethod · 0.45

Tested by

no test coverage detected