Open JakobDev opened 1 year ago
I need to output a CSV which has localized bool values. I tried this code according to the Readme:
func (value bool) MarshalCSV() (string, error) { if value { return "Ja", nil } else { return "Nein", nil } }
but it fails, because bool is a built-in type.
@JakobDev How about trying this?
type CustomBool struct { bool } func (b *CustomBool) MarshalCSV() (string, error) { if b.bool { return "Ja", nil } else { return "Nein", nil } }
I need to output a CSV which has localized bool values. I tried this code according to the Readme:
but it fails, because bool is a built-in type.