Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ForMarshaling ¶
type ForMarshaling Test
This absurdity is a workaround for a bug github.com/go-yaml/yaml/issues/817 in the YAML library. We want to inline a Test in a WithHeader when marshaling. But the bug prevents that, because anything that implements Unmarshaler cannot be inlined. As a workaround, we create a new type with the same fields but without the Unmarshal method.
type Test ¶
type Test struct { // Pos is the YAML file location where this object started. Pos model.ConfigPos `yaml:"-"` Inputs []*VarValue `yaml:"inputs,omitempty"` BuiltinVars []*VarValue `yaml:"builtin_vars,omitempty"` // Features configures which features to use depending on goldentest API version. Features features.Features `yaml:"-"` }
Test represents a parsed test.yaml describing test configs.
func (*Test) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler.
type VarValue ¶
type VarValue struct { // Pos is the YAML file location where this object started. Pos model.ConfigPos `yaml:"-"` Name model.String `yaml:"name"` Value model.String `yaml:"value"` }
VarValue represents one of the parsed "input" fields from the inputs.yaml file.
func (*VarValue) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler.
type WithHeader ¶
type WithHeader header.With[*ForMarshaling]
This absurdity is a workaround for a bug github.com/go-yaml/yaml/issues/817 in the YAML library. We want to inline a Test in a WithHeader when marshaling. But the bug prevents that, because anything that implements Unmarshaler cannot be inlined. As a workaround, we create a new type with the same fields but without the Unmarshal method.