diff --git a/echo.go b/echo.go new file mode 100644 index 0000000..a3f43ca --- /dev/null +++ b/echo.go @@ -0,0 +1,10 @@ +package goption + +import ( + "fmt" +) + +func (cb *Optional[T]) UnmarshalText(text []byte) error { + return cb.UnmarshalJSON([]byte(fmt.Sprintf("\"%s\"", text))) + +}