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: 2022.go
    path of file: ./repos/scan4all/vendor/github.com/saintfish/chardet
    
    the code of the file until where you have to start completion: package chardet

import (
	"bytes"
)

type recognizer2022 struct {
	charset string
	escapes [][]byte
}

func (r *recognizer2022) Match(input *recognizerInput) (output recognizerOutput) {
	return recognizerOutput{
		Charset:    r.charset,
		Conf
    
func (r *recognizer2022) matchConfidence(input []byte) int {
	var hits, misses, shifts int
input:
	for i := 0; i < len(input); i++ {
		c := input[i]
		if c == 0x1B {
			for _, esc := range r.escapes {
				if bytes.HasPrefix(input[i+1:], esc) {
					hits++
					i += len(esc)
					continue input
				}
			}
			misses++
		} else if c == 0x0E || c == 0x0F {
			shifts++
		}
	}
	if hits == 0 {
		return 0
	}
	quality := (100*hits - 100*misses) / (hits + misses)
	if hits+shifts < 5 {
		quality -= (5 - (hits + shifts)) * 10
	}
	if quality < 0 {
		quality = 0
	}
	return quality
}