feat: rename repr to expr
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
type Codec interface {
|
||||
codec.Codec[Repr]
|
||||
codec.Codec[Expr]
|
||||
|
||||
InType() string
|
||||
}
|
||||
@@ -18,16 +18,16 @@ type convertedCodec[T any] struct {
|
||||
inType string
|
||||
}
|
||||
|
||||
func (c convertedCodec[T]) Decode(s string) (Repr, error) {
|
||||
func (c convertedCodec[T]) Decode(s string) (Expr, error) {
|
||||
t, err := c.codec.Decode(s)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return NewRepr(c.inType, t), nil
|
||||
return NewExpr(c.inType, t), nil
|
||||
}
|
||||
|
||||
func (c convertedCodec[T]) Encode(r Repr) (string, error) {
|
||||
func (c convertedCodec[T]) Encode(r Expr) (string, error) {
|
||||
t, ok := r.Data().(T)
|
||||
if !ok {
|
||||
dataType := reflect.TypeOf(r.Data())
|
||||
|
||||
Reference in New Issue
Block a user