Documentation
¶
Index ¶
- func AssertDocsTOMLComplete[C any](t *testing.T, docsTOML string)
- func AssertFieldsNotNil(t *testing.T, s interface{})
- func AssertFullMarshal[C any](t *testing.T, c C, expTOML string)
- func CheckDocsTOMLComplete[C any](t *testing.T, docsTOML string) (int, error)
- func CheckFieldsNotNil(t *testing.T, s interface{}) (int, error)
- func DocDefaultsOnly(r io.Reader, cfg any, decode func(io.Reader, any) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertDocsTOMLComplete ¶
AssertDocsTOMLComplete ensures that docsTOML contains every field in C and no extra fields.
func AssertFieldsNotNil ¶
AssertFieldsNotNil recursively checks s for nil fields. s must be a struct.
func AssertFullMarshal ¶
AssertFullMarshal ensures that c encodes to expTOML and contains no nil fields.
func CheckDocsTOMLComplete ¶
CheckDocsTOMLComplete ensures that docsTOML returns the number of nil fields in C and an error listing them. It requires that no extra fields are present.
func CheckFieldsNotNil ¶
CheckFieldsNotNil recursively checks s for nil fields. s must be a struct. Returns the number of nil fields found and an error describing them.
func DocDefaultsOnly ¶
DocDefaultsOnly reads only the default values from a docs TOML file and decodes in to cfg. Fields without defaults will set to zero values. Arrays of tables are ignored. Deprecated: use configdoc.DefaultsOnly
Types ¶
This section is empty.