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

import (
	"os"

	"github.com/cointop-sh/cointop/pkg/gocui"
	log "github.com/sirupsen/logrus"
)

// Quit quits the progr
    
func (ct *Cointop) QuitView() error {
	log.Debug("QuitView()")
	if ct.State.selectedView != CoinsView {
		ct.SetSelectedView(CoinsView)
		return ct.UpdateTable()
	}
	if ct.ui.ActiveViewName() == ct.Views.Table.Name() {
		return ct.Quit()
	}

	return nil
}