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: stashview.go
    path of file: ./repos/gitbatch/internal/gui
    
    the code of the file until where you have to start completion: package gui

import (
	"fmt"
	"strings"

	"github.com/isacikgoz/gitbatch/internal/command"
	"github.com/isacikgoz/gitbatch/internal/git"
	"github.com/jroimartin/gocui"
)

// initialize stashed items
func (gui *Gui) initStashedView(r *git.Repository) error {
	v, err := gui.g.View(stashViewFeature.Name)
	if err != nil {
		return err
	}
	v.Clear()
	st := r.Stasheds
	for _, s := range st {
		fmt.Fprintf(v,
    
func (gui *Gui) stashPop(g *gocui.Gui, v *gocui.View) error {
	r := gui.getSelectedRepository()
	_, oy := v.Origin()
	_, cy := v.Cursor()
	if len(r.Stasheds) <= 0 {
		return nil
	}
	stashedItem := r.Stasheds[oy+cy]
	output, err := stashedItem.Pop()
	if err != nil {
		if err = gui.openErrorView(g, output,
			"You should manually resolve this issue",
			stashViewFeature.Name); err != nil {
			return err
		}
	}
	// since the pop is a func of stashed item, we need to refresh entity here
	_ = r.Refresh()
	if err := gui.focusToRepository(g, v); err != nil {
		return err
	}
	if err := gui.initStashedView(r); err != nil {
		return err
	}
	return nil
}