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

const (
	evMaxErrorDisplayNum = uint(5)
)

// ErrorView contains state for the error view
type ErrorView struct {
	errors []error
}

// NewErrorView creates a new instance of the error view
    
func (errorView *ErrorView) DisplayRowsRequired() uint {
	errorNum := uint(len(errorView.errors))

	var rowsRequired uint
	switch {
	case errorNum == 0:
		return 0
	case errorNum > evMaxErrorDisplayNum:
		rowsRequired = evMaxErrorDisplayNum + 1
	default:
		rowsRequired = errorNum
	}

	return rowsRequired + 2
}