| commit | 78550bb1d05cd1ea812b182b603bf401a7d33ce9 | [log] [tgz] |
|---|---|---|
| author | Bryan Mills <bcmills@google.com> | Fri Apr 01 08:55:00 2016 +1100 |
| committer | David Symonds <dsymonds@golang.org> | Wed Apr 13 14:04:24 2016 +1000 |
| tree | 41cc9d8862f9db1e9e0a98e7fb481c10380ff1b2 | |
| parent | dda510ac0fd43b39770f22ac6260eb91d377bce3 [diff] [blame] |
Improve error message when text unmarshaling a nested message with a required field. Signed-off-by: David Symonds <dsymonds@golang.org>
diff --git a/proto/text_parser.go b/proto/text_parser.go index b5e1c8e..b5fba5b 100644 --- a/proto/text_parser.go +++ b/proto/text_parser.go
@@ -663,7 +663,8 @@ return err } reqFieldErr = err - } else if props.Required { + } + if props.Required { reqCount-- }