You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: keybindings.go
    path of file: ./repos/gitbatch/internal/gui
    
    the code of the file until where you have to start completion: package gui

import (
	"fmt"

	"github.com/jroimartin/gocui"
)

// KeyBinding struct is helpful for not re-writing the same function over and
// over again. it hold useful values to generate a controls view
type KeyBinding struct {
	View        string
	Handler     func(*gocui.Gui, *gocui.View) error
	Key         interface{}
	Modifier    gocui.Modifier
	Display     string
	Description string
	Vital       bool
}

// generate the gui's controls a.k.a. keybindings
func (gui *Gui) generateKeybindings() error {
	// Mainviews common keybindings
	gui.KeyBindings = make([]*KeyBinding, 0)
	for _, view := range focusViews {
		focusKeybindings :=
    
func (gui *Gui) updateKeyBindingsView(g *gocui.Gui, viewName string) error {
	v, err := g.View(keybindingsViewFeature.Name)
	if err != nil {
		return err
	}
	v.Clear()
	v.BgColor = gocui.ColorWhite
	v.FgColor = gocui.ColorBlack
	v.Frame = false
	fmt.Fprint(v, ws)
	modeLabel := ""
	switch mode := gui.State.Mode.ModeID; mode {
	case FetchMode:
		v.BgColor = gocui.ColorBlue
		modeLabel = fetchSymbol + ws + "FETCH"
	case PullMode:
		v.BgColor = gocui.ColorMagenta
		modeLabel = pullSymbol + ws + "PULL"
	case MergeMode:
		v.BgColor = gocui.ColorCyan
		modeLabel = mergeSymbol + ws + "MERGE"
	case CheckoutMode:
		v.BgColor = gocui.ColorGreen
		modeLabel = checkoutSymbol + ws + "CHECKOUT"
	default:
		modeLabel = "No mode selected"
	}

	fmt.Fprint(v, ws+modeLabel+ws+modeSeperator)

	for _, k := range gui.KeyBindings {
		if k.View == viewName && k.Vital {
			binding := keyBindingSeperator + ws + k.Display + ":" + ws + k.Description + ws
			fmt.Fprint(v, binding)
		}
	}
	return nil
}