diff options
| author | Shulhan <ms@kilabit.info> | 2021-08-12 23:35:47 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-08-12 23:35:47 +0700 |
| commit | 4aa4b560eb683d742dc7ff3136089c73f6a0023d (patch) | |
| tree | 95c83604364b877ae3d42f10ca812731521237e9 /lib/memfs/pathnode.go | |
| parent | 8148fdb18dbcf22a9c9c724fc9b22b8adb5ee7dd (diff) | |
| download | pakakeh.go-4aa4b560eb683d742dc7ff3136089c73f6a0023d.tar.xz | |
lib/memfs: make the MarshalJSON on Node to return the content
Encoding the PathNode to JSON will include the content of each Node, but
encoding only single Node will include the content.
Diffstat (limited to 'lib/memfs/pathnode.go')
| -rw-r--r-- | lib/memfs/pathnode.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/memfs/pathnode.go b/lib/memfs/pathnode.go index 032b0dac..0449768e 100644 --- a/lib/memfs/pathnode.go +++ b/lib/memfs/pathnode.go @@ -67,7 +67,7 @@ func (pn *PathNode) MarshalJSON() ([]byte, error) { } fmt.Fprintf(&buf, "%q:", key) node := pn.v[key] - node.packAsJson(&buf) + node.packAsJson(&buf, false) } _ = buf.WriteByte('}') |
