From 562242ca3f859d2320252b3fce5bee06f055aa80 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 22 Jan 2021 13:56:55 +0800 Subject: [PATCH] 1 --- xobject.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xobject.go b/xobject.go index 2edfe93..fde7ab4 100644 --- a/xobject.go +++ b/xobject.go @@ -35,6 +35,9 @@ func (this *XObject) Size() int { if (this._type == XOT_ARRAY) { array := this._val.([]*XObject) return len(array) + } else if (this._type == XOT_OBJECT) { + object := this._val.(map[string]*XObject) + return len(object) } else { panic("XObject.Size type error") return 0