Search and commands

↑ ↓ to select · Enter to open · Esc to close

Type to search packages.

yaml

v1.12.1
github.com/stretchr/testify/assert/yaml

Documentation

pkg.go.dev ↗

Table of contents

↓ to select · Enter to jump· Shift+Enter for source

2 matches

Top ↑

Package yaml is just an indirection to handle YAML deserialization.

This package is just an indirection that allows the builder to override the indirection with an alternative implementation of this package that uses another implementation of YAML deserialization. This allows to not either not use YAML deserialization at all, or to use another implementation than go.yaml.in/yaml/v3 (for example for license compatibility reasons, see PR #1120).

Alternative implementations are selected using build tags:

Usage:

go test -tags testify_yaml_fail

You can check with "go list" which implementation is linked:

go list -f '{{.Imports}}' github.com/stretchr/testify/assert/yaml
go list -tags testify_yaml_fail -f '{{.Imports}}' github.com/stretchr/testify/assert/yaml
go list -tags testify_yaml_custom -f '{{.Imports}}' github.com/stretchr/testify/assert/yaml

Functions

Unmarshal

func Unmarshal(in []byte, out interface{}) error

Unmarshal is just a wrapper of go.yaml.in/yaml/v3.Unmarshal.

Dependency graph