yaml_fail.go

 1//go:build testify_yaml_fail && !testify_yaml_custom && !testify_yaml_default
 2// +build testify_yaml_fail,!testify_yaml_custom,!testify_yaml_default
 3
 4// Package yaml is an implementation of YAML functions that always fail.
 5//
 6// This implementation can be used at build time to replace the default implementation
 7// to avoid linking with [gopkg.in/yaml.v3]:
 8//
 9//	go test -tags testify_yaml_fail
10package yaml
11
12import "errors"
13
14var errNotImplemented = errors.New("YAML functions are not available (see https://pkg.go.dev/github.com/stretchr/testify/assert/yaml)")
15
16func Unmarshal([]byte, interface{}) error {
17	return errNotImplemented
18}