Ctrl K
ComunidadGuías…

options/errors.go

Rama master · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
package options

import (
	"fmt"

	"github.com/imgproxy/imgproxy/v4/errctx"
)

type (
	TypeMismatchError struct{ *errctx.TextError }
)

func newTypeMismatchError(key string, exp, got any) error {
	return TypeMismatchError{errctx.NewTextError(
		fmt.Sprintf("option %s is %T, not %T", key, exp, got),
		1,
	)}
}