You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
351 B
17 lines
351 B
package field
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
func NewEncoderText(opts ...func(*BaseEncoder)) BaseEncoder {
|
|
opts = append([]func(*BaseEncoder){
|
|
WithGropuConfig(0, 0, ' '),
|
|
WithNullValue("<nil>"),
|
|
WithDefaultValue(func(dst []byte, _ Encoder, val Value) []byte {
|
|
return fmt.Appendf(dst, "%+v", val.Any())
|
|
}),
|
|
}, opts...)
|
|
|
|
return NewEncoder(opts...)
|
|
}
|
|
|