commit 2f2cca6aadb7a17f07ce1223814f81606ed90e80
parent 4bfe9a336de8b0f1a350f53bcb5df3d327e6f42b
Author: Francois Parquet <francois.parquet@gmail.com>
Date: Thu, 13 Sep 2018 11:34:46 +0800
Merge pull request #74 from nemosupremo/patch-1
README.md: Type fix in MarshalerJSONArray example
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
@@ -489,13 +489,13 @@ Example of implementation:
```go
type users []*user
// implement MarshalerJSONArray
-func (u *users) MarshalJSONArray(dec *gojay.Decoder) {
+func (u *users) MarshalJSONArray(enc *gojay.Encoder) {
for _, e := range u {
- enc.Object(e)
- }
+ enc.Object(e)
+ }
}
func (u *users) IsNil() bool {
- return len(u) == 0
+ return len(u) == 0
}
```