From 0fe51c2f54852a5ee64b67ac43de8a706792cd17 Mon Sep 17 00:00:00 2001 From: Prashant Varanasi Date: Mon, 9 Apr 2018 18:09:18 -0700 Subject: [PATCH] Fix typo in generated comment for UnmarshalText Currently, the generated code starts with "// MarshalText" even though the method is "UnmarshalText". --- enumer.go | 2 +- golden_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/enumer.go b/enumer.go index 6f8fecd..6c3d6fd 100644 --- a/enumer.go +++ b/enumer.go @@ -119,7 +119,7 @@ func (i %[1]s) MarshalText() ([]byte, error) { return []byte(i.String()), nil } -// MarshalText implements the encoding.TextUnmarshaler interface for %[1]s +// UnmarshalText implements the encoding.TextUnmarshaler interface for %[1]s func (i *%[1]s) UnmarshalText(text []byte) error { var err error *i, err = %[1]sString(string(text)) diff --git a/golden_test.go b/golden_test.go index b721a28..0a81aad 100644 --- a/golden_test.go +++ b/golden_test.go @@ -660,7 +660,7 @@ func (i Prime) MarshalText() ([]byte, error) { return []byte(i.String()), nil } -// MarshalText implements the encoding.TextUnmarshaler interface for Prime +// UnmarshalText implements the encoding.TextUnmarshaler interface for Prime func (i *Prime) UnmarshalText(text []byte) error { var err error *i, err = PrimeString(string(text))