From 7e53b6c25dd4e4cd0184520f5344275cef7adf35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Wed, 17 Feb 2016 16:52:02 +0000 Subject: [PATCH] Simplify UnmarshalText signatures --- fieldtypes.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fieldtypes.go b/fieldtypes.go index b2036da..3e5e69d 100644 --- a/fieldtypes.go +++ b/fieldtypes.go @@ -19,7 +19,7 @@ func (cl *CommaList) String() string { return strings.Join(*cl, ",") } -func (cl *CommaList) UnmarshalText(text []byte) (err error) { +func (cl *CommaList) UnmarshalText(text []byte) error { cl.FromString(string(text)) return nil } @@ -44,7 +44,7 @@ func (hv *HexVal) String() string { return hex.EncodeToString(*hv) } -func (hv *HexVal) UnmarshalText(text []byte) (err error) { +func (hv *HexVal) UnmarshalText(text []byte) error { return hv.FromString(string(text)) } @@ -65,6 +65,6 @@ func (dv *DateVal) String() string { return dv.Format("2006-01-02") } -func (dv *DateVal) UnmarshalText(text []byte) (err error) { +func (dv *DateVal) UnmarshalText(text []byte) error { return dv.FromString(string(text)) }