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

import (
	"go/ast"
	"go/types"

	"github.com/go-critic/go-critic/checkers/internal/astwalk"
	"github.com/go-critic/go-critic/linter"
)

func init() {
	var info linter.CheckerInfo
	info.Name = "unnamedResult"
	info.Tags = []string{linter.StyleTag, linter.OpinionatedTag, linter.ExperimentalTag}
	info.Params = linter.CheckerParams{
		"checkExported": {
			Value: false,
			Usage: "whether to check exported functions",
		},
	}
	info.Summary = "Detects unnamed results that may benefit from names"
	info.Before = `func f() (float64, float64)`
	info.After = `func f() (x, y float64)`

	collection.AddChecker(&info, func(ctx *linter.CheckerContext) (linter.FileWalker, error) {
		c := &unnamedResultChecker{ctx: ctx}
		c.checkExported = info.Para
    
func (c *unnamedResultChecker) VisitFuncDecl(decl *ast.FuncDecl) {
	if c.checkExported && !ast.IsExported(decl.Name.Name) {
		return
	}
	results := decl.Type.Results
	switch {
	case results == nil:
		return // Function has no results
	case len(results.List) != 0 && results.List[0].Names != nil:
		return // Skip named results
	}

	typeName := func(x ast.Expr) string { return c.typeName(c.ctx.TypeOf(x)) }
	isError := func(x ast.Expr) bool { return qualifiedName(x) == "error" }
	isBool := func(x ast.Expr) bool { return qualifiedName(x) == "bool" }

	// Main difference with case of len=2 is that we permit any
	// typ1 as long as second type is either error or bool.
	if results.NumFields() == 2 {
		typ1, typ2 := results.List[0].Type, results.List[1].Type
		name1, name2 := typeName(typ1), typeName(typ2)
		cond := (name1 != name2 && name2 != "") ||
			(!isError(typ1) && isError(typ2)) ||
			(!isBool(typ1) && isBool(typ2))
		if !cond {
			c.warn(decl)
		}
		return
	}

	seen := make(map[string]bool, len(results.List))
	for i := range results.List {
		typ := results.List[i].Type
		name := typeName(typ)
		isLast := i == len(results.List)-1

		cond := !seen[name] ||
			(isLast && (isError(typ) || isBool(typ)))
		if !cond {
			c.warn(decl)
			return
		}

		seen[name] = true
	}
}