One of my survey questions maps its answer to a struct field:
type Answers struct {
Field SomeOtherStruct
}
func (s *SomeOtherStruct) UnmarshalText(data []byte) error {
// code to convert text into struct
}
When using this struct as the survey output, it results in: Unable to convert from string to type struct.
But this conversion is already described in detail in my UnmarshalText function, which gets ignored now.
It would be nice if the conversion code would check if a type implements TextUnmarshaler.
It would be nice for
core.WriteAnswer
to takeUnmarshalText
into account.One of my survey questions maps its answer to a struct field:
When using this struct as the survey output, it results in:
Unable to convert from string to type struct
.But this conversion is already described in detail in my
UnmarshalText
function, which gets ignored now. It would be nice if the conversion code would check if a type implementsTextUnmarshaler
.