Mock Version: 1.4.14 Mock Version: 1.4.14 Mock Version: 1.4.14 ENTER ['do'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/golang-github-clbanning-x2j.spec'], chrootPath='/var/lib/mock/886532-custom-1-x86_64-1555968837.678112/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'}shell=Falselogger=timeout=0uid=1001gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.54qr__1e:/etc/resolv.conf']unshare_net=TrueprintOutput=True) ENTER ['do'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/golang-github-clbanning-x2j.spec'], chrootPath='/var/lib/mock/886532-custom-1-x86_64-1555968837.678112/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'}shell=Falselogger=timeout=0uid=1001gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.54qr__1e:/etc/resolv.conf']unshare_net=TrueprintOutput=True) Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '57bfe614099e4f30aacf6d150d790f62', '-D', '/var/lib/mock/886532-custom-1-x86_64-1555968837.678112/root', '-a', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.54qr__1e:/etc/resolv.conf', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=en_US.UTF-8', '-u', 'mockbuild', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/golang-github-clbanning-x2j.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'} and shell False Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '57bfe614099e4f30aacf6d150d790f62', '-D', '/var/lib/mock/886532-custom-1-x86_64-1555968837.678112/root', '-a', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.54qr__1e:/etc/resolv.conf', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=en_US.UTF-8', '-u', 'mockbuild', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/golang-github-clbanning-x2j.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'} and shell False Building target platforms: x86_64 Building target platforms: x86_64 Building for target x86_64 Building for target x86_64 Wrote: /builddir/build/SRPMS/golang-github-clbanning-x2j-1.1-1.fc31.src.rpm Wrote: /builddir/build/SRPMS/golang-github-clbanning-x2j-1.1-1.fc31.src.rpm Child return code was: 0 Child return code was: 0 ENTER ['do'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/golang-github-clbanning-x2j.spec'], chrootPath='/var/lib/mock/886532-custom-1-x86_64-1555968837.678112/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'}shell=Falselogger=timeout=0uid=1001gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.54qr__1e:/etc/resolv.conf']unshare_net=TrueprintOutput=True) ENTER ['do'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/golang-github-clbanning-x2j.spec'], chrootPath='/var/lib/mock/886532-custom-1-x86_64-1555968837.678112/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'}shell=Falselogger=timeout=0uid=1001gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.54qr__1e:/etc/resolv.conf']unshare_net=TrueprintOutput=True) Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '6c264e57810e4be3be4f423910b87729', '-D', '/var/lib/mock/886532-custom-1-x86_64-1555968837.678112/root', '-a', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.54qr__1e:/etc/resolv.conf', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=en_US.UTF-8', '-u', 'mockbuild', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/golang-github-clbanning-x2j.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'} and shell False Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '6c264e57810e4be3be4f423910b87729', '-D', '/var/lib/mock/886532-custom-1-x86_64-1555968837.678112/root', '-a', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.54qr__1e:/etc/resolv.conf', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=en_US.UTF-8', '-u', 'mockbuild', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/golang-github-clbanning-x2j.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'} and shell False Building target platforms: x86_64 Building target platforms: x86_64 Building for target x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.s6yFAv Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.s6yFAv + umask 022 + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf x2j-1.1 + rm -rf x2j-1.1 + /usr/bin/gzip -dc /builddir/build/SOURCES/x2j-1.1.tar.gz + /usr/bin/gzip -dc /builddir/build/SOURCES/x2j-1.1.tar.gz + /usr/bin/tar -xof - + /usr/bin/tar -xof - + STATUS=0 + STATUS=0 + '[' 0 -ne 0 ']' + '[' 0 -ne 0 ']' + cd x2j-1.1 + cd x2j-1.1 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + rm -fr /builddir/build/BUILD/x2j-1.1/vendor + rm -fr /builddir/build/BUILD/x2j-1.1/vendor + [[ ! -e /builddir/build/BUILD/x2j-1.1/_build/bin ]] + [[ ! -e /builddir/build/BUILD/x2j-1.1/_build/bin ]] + install -m 0755 -vd /builddir/build/BUILD/x2j-1.1/_build/bin + install -m 0755 -vd /builddir/build/BUILD/x2j-1.1/_build/bin install: creating directory '/builddir/build/BUILD/x2j-1.1/_build' install: creating directory '/builddir/build/BUILD/x2j-1.1/_build' install: creating directory '/builddir/build/BUILD/x2j-1.1/_build/bin' install: creating directory '/builddir/build/BUILD/x2j-1.1/_build/bin' + export GOPATH=/builddir/build/BUILD/x2j-1.1/_build:/usr/share/gocode + export GOPATH=/builddir/build/BUILD/x2j-1.1/_build:/usr/share/gocode + GOPATH=/builddir/build/BUILD/x2j-1.1/_build:/usr/share/gocode + GOPATH=/builddir/build/BUILD/x2j-1.1/_build:/usr/share/gocode + [[ ! -e /builddir/build/BUILD/x2j-1.1/_build/src/github.com/clbanning/x2j ]] + [[ ! -e /builddir/build/BUILD/x2j-1.1/_build/src/github.com/clbanning/x2j ]] BUILDSTDERR: ++ dirname /builddir/build/BUILD/x2j-1.1/_build/src/github.com/clbanning/x2j BUILDSTDERR: ++ dirname /builddir/build/BUILD/x2j-1.1/_build/src/github.com/clbanning/x2j + install -m 0755 -vd /builddir/build/BUILD/x2j-1.1/_build/src/github.com/clbanning + install -m 0755 -vd /builddir/build/BUILD/x2j-1.1/_build/src/github.com/clbanning install: creating directory '/builddir/build/BUILD/x2j-1.1/_build/src' install: creating directory '/builddir/build/BUILD/x2j-1.1/_build/src' install: creating directory '/builddir/build/BUILD/x2j-1.1/_build/src/github.com' install: creating directory '/builddir/build/BUILD/x2j-1.1/_build/src/github.com' install: creating directory '/builddir/build/BUILD/x2j-1.1/_build/src/github.com/clbanning' install: creating directory '/builddir/build/BUILD/x2j-1.1/_build/src/github.com/clbanning' + ln -fs /builddir/build/BUILD/x2j-1.1 /builddir/build/BUILD/x2j-1.1/_build/src/github.com/clbanning/x2j + ln -fs /builddir/build/BUILD/x2j-1.1 /builddir/build/BUILD/x2j-1.1/_build/src/github.com/clbanning/x2j + cd /builddir/build/BUILD/x2j-1.1/_build/src/github.com/clbanning/x2j + cd /builddir/build/BUILD/x2j-1.1/_build/src/github.com/clbanning/x2j + echo 'Patch #0 (0001-Remove-redundant-newlines-in-Println-statement.patch):' + echo 'Patch #0 (0001-Remove-redundant-newlines-in-Println-statement.patch):' Patch #0 (0001-Remove-redundant-newlines-in-Println-statement.patch): Patch #0 (0001-Remove-redundant-newlines-in-Println-statement.patch): + /usr/bin/patch --no-backup-if-mismatch -p1 --fuzz=0 + /usr/bin/patch --no-backup-if-mismatch -p1 --fuzz=0 patching file examples/gonuts2.go patching file examples/gonuts2.go patching file x2j_test.go patching file x2j_test.go patching file x2jpath_test.go patching file x2jpath_test.go + exit 0 + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.oYgBGu Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.oYgBGu + umask 022 + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64 '!=' / ']' + '[' /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64 '!=' / ']' + rm -rf /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64 + rm -rf /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64 BUILDSTDERR: ++ dirname /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64 BUILDSTDERR: ++ dirname /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64 + mkdir -p /builddir/build/BUILDROOT + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64 + mkdir /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64 + cd x2j-1.1 + cd x2j-1.1 + cd /builddir/build/BUILD/x2j-1.1/_build/src/github.com/clbanning/x2j + cd /builddir/build/BUILD/x2j-1.1/_build/src/github.com/clbanning/x2j + IFS= + IFS= BUILDSTDERR: +++ realpath -e --relative-base=. BUILDSTDERR: +++ realpath -e --relative-base=. BUILDSTDERR: +++ sort -u BUILDSTDERR: +++ sort -u BUILDSTDERR: realpath: missing operand BUILDSTDERR: realpath: missing operand BUILDSTDERR: Try 'realpath --help' for more information. BUILDSTDERR: Try 'realpath --help' for more information. BUILDSTDERR: ++ IFS= BUILDSTDERR: ++ IFS= BUILDSTDERR: ++ read -r finc BUILDSTDERR: ++ read -r finc BUILDSTDERR: ++ realpath -qe --relative-base=. '' BUILDSTDERR: ++ realpath -qe --relative-base=. '' BUILDSTDERR: ++ sort -u BUILDSTDERR: ++ sort -u BUILDSTDERR: ++ grep -q '' BUILDSTDERR: ++ grep -q '' BUILDSTDERR: ++ echo '' BUILDSTDERR: ++ echo '' BUILDSTDERR: ++ IFS= BUILDSTDERR: ++ IFS= BUILDSTDERR: ++ read -r finc BUILDSTDERR: ++ read -r finc + gosupfiles= + gosupfiles= + mapfile -t gosupfilesA + mapfile -t gosupfilesA + go-rpm-integration install -i github.com/clbanning/x2j -b /builddir/build/BUILD/x2j-1.1/_build/bin -s /builddir/build/BUILD/x2j-1.1/_build -o golang-github-clbanning-x2j-devel.file-list -O /builddir/build/BUILD/x2j-1.1 -V 1.1-1.fc31 -T 1.1 -p /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64 -g /usr/share/gocode -r '.*example.*' '' + go-rpm-integration install -i github.com/clbanning/x2j -b /builddir/build/BUILD/x2j-1.1/_build/bin -s /builddir/build/BUILD/x2j-1.1/_build -o golang-github-clbanning-x2j-devel.file-list -O /builddir/build/BUILD/x2j-1.1 -V 1.1-1.fc31 -T 1.1 -p /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64 -g /usr/share/gocode -r '.*example.*' '' Installing: github.com/clbanning/x2j Installing: github.com/clbanning/x2j BUILDSTDERR: realpath: '': No such file or directory BUILDSTDERR: realpath: '': No such file or directory BUILDSTDERR: realpath: go.mod: No such file or directory BUILDSTDERR: realpath: go.mod: No such file or directory + IFS= + IFS= BUILDSTDERR: +++ realpath -e --relative-base=. examples README BUILDSTDERR: +++ realpath -e --relative-base=. examples README BUILDSTDERR: +++ sort -u BUILDSTDERR: +++ sort -u BUILDSTDERR: ++ IFS= BUILDSTDERR: ++ IFS= BUILDSTDERR: ++ read -r finc BUILDSTDERR: ++ read -r finc BUILDSTDERR: ++ realpath -qe --relative-base=. '' BUILDSTDERR: ++ realpath -qe --relative-base=. '' BUILDSTDERR: ++ grep -q README BUILDSTDERR: ++ grep -q README BUILDSTDERR: ++ sort -u BUILDSTDERR: ++ sort -u BUILDSTDERR: ++ echo README BUILDSTDERR: ++ echo README BUILDSTDERR: ++ IFS= BUILDSTDERR: ++ IFS= BUILDSTDERR: ++ read -r finc BUILDSTDERR: ++ read -r finc BUILDSTDERR: ++ sort -u BUILDSTDERR: ++ sort -u BUILDSTDERR: ++ grep -q examples BUILDSTDERR: ++ grep -q examples BUILDSTDERR: ++ realpath -qe --relative-base=. '' BUILDSTDERR: ++ realpath -qe --relative-base=. '' BUILDSTDERR: ++ echo examples BUILDSTDERR: ++ echo examples BUILDSTDERR: ++ IFS= BUILDSTDERR: ++ IFS= BUILDSTDERR: ++ read -r finc BUILDSTDERR: ++ read -r finc + godocs='README + godocs='README BUILDSTDERR: examples' BUILDSTDERR: examples' + [[ -n README + [[ -n README BUILDSTDERR: examples ]] BUILDSTDERR: examples ]] + IFS= + IFS= + read -r f + read -r f + echo %doc '"README"' + echo %doc '"README"' + IFS= + IFS= + read -r f + read -r f + echo %doc '"examples"' + echo %doc '"examples"' + IFS= + IFS= + read -r f + read -r f + IFS= + IFS= BUILDSTDERR: +++ realpath -e --relative-base=. LICENSE BUILDSTDERR: +++ realpath -e --relative-base=. LICENSE BUILDSTDERR: +++ sort -u BUILDSTDERR: +++ sort -u BUILDSTDERR: ++ IFS= BUILDSTDERR: ++ IFS= BUILDSTDERR: ++ read -r finc BUILDSTDERR: ++ read -r finc BUILDSTDERR: ++ realpath -qe --relative-base=. '' BUILDSTDERR: ++ realpath -qe --relative-base=. '' BUILDSTDERR: ++ grep -q LICENSE BUILDSTDERR: ++ grep -q LICENSE BUILDSTDERR: ++ sort -u BUILDSTDERR: ++ sort -u BUILDSTDERR: ++ echo LICENSE BUILDSTDERR: ++ echo LICENSE BUILDSTDERR: ++ IFS= BUILDSTDERR: ++ IFS= BUILDSTDERR: ++ read -r finc BUILDSTDERR: ++ read -r finc + golicenses=LICENSE + golicenses=LICENSE + [[ -n LICENSE ]] + [[ -n LICENSE ]] + IFS= + IFS= + read -r f + read -r f + echo %license '"LICENSE"' + echo %license '"LICENSE"' + IFS= + IFS= + read -r f + read -r f + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-ldconfig + /usr/lib/rpm/redhat/brp-ldconfig + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-strip /usr/bin/strip + /usr/lib/rpm/brp-strip /usr/bin/strip + /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump + /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1 0 + /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1 0 + /usr/lib/rpm/brp-python-hardlink + /usr/lib/rpm/brp-python-hardlink + /usr/lib/rpm/redhat/brp-mangle-shebangs + /usr/lib/rpm/redhat/brp-mangle-shebangs Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.UgVuIt Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.UgVuIt + umask 022 + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + cd x2j-1.1 + cd x2j-1.1 + LDFLAGS='-X github.com/clbanning/x2j/version.tag=1.1 -X github.com/clbanning/x2j/version=1.1' + LDFLAGS='-X github.com/clbanning/x2j/version.tag=1.1 -X github.com/clbanning/x2j/version=1.1' + GO_TEST_FLAGS='-buildmode pie -compiler gc' + GO_TEST_FLAGS='-buildmode pie -compiler gc' + GO_TEST_EXT_LD_FLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' + GO_TEST_EXT_LD_FLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' + go-rpm-integration check -i github.com/clbanning/x2j -b /builddir/build/BUILD/x2j-1.1/_build/bin -s /builddir/build/BUILD/x2j-1.1/_build -V 1.1-1.fc31 -T 1.1 -p /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64 -g /usr/share/gocode -r '.*example.*' + go-rpm-integration check -i github.com/clbanning/x2j -b /builddir/build/BUILD/x2j-1.1/_build/bin -s /builddir/build/BUILD/x2j-1.1/_build -V 1.1-1.fc31 -T 1.1 -p /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64 -g /usr/share/gocode -r '.*example.*' Testing in: /builddir/build/BUILD/x2j-1.1/_build/src Testing in: /builddir/build/BUILD/x2j-1.1/_build/src PATH: /builddir/build/BUILD/x2j-1.1/_build/bin:/builddir/.local/bin:/builddir/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin PATH: /builddir/build/BUILD/x2j-1.1/_build/bin:/builddir/.local/bin:/builddir/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin GOPATH: /builddir/build/BUILD/x2j-1.1/_build:/usr/share/gocode GOPATH: /builddir/build/BUILD/x2j-1.1/_build:/usr/share/gocode command: go test -buildmode pie -compiler gc -ldflags "-X github.com/clbanning/x2j/version.tag=1.1 -X github.com/clbanning/x2j/version=1.1 -extldflags '-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" command: go test -buildmode pie -compiler gc -ldflags "-X github.com/clbanning/x2j/version.tag=1.1 -X github.com/clbanning/x2j/version=1.1 -extldflags '-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" testing: github.com/clbanning/x2j testing: github.com/clbanning/x2j github.com/clbanning/x2j github.com/clbanning/x2j TestGoofy ... MapToDoc: map[byteVal:[116 104 101 32 97 105 100 32 111 102 32 116 104 101 105 114 32 99 111 117 110 116 114 121] goofyVal:0xc000096080 nilVal: xml:map[tag:map[-bool:true -one:1 -pi:3.1415962535] tagJR:map[-key:value]]] TestGoofy ... MapToDoc: map[byteVal:[116 104 101 32 97 105 100 32 111 102 32 116 104 101 105 114 32 99 111 117 110 116 114 121] goofyVal:0xc000096080 nilVal: xml:map[tag:map[-bool:true -one:1 -pi:3.1415962535] tagJR:map[-key:value]]] v: {"byteVal":"dGhlIGFpZCBvZiB0aGVpciBjb3VudHJ5","goofyVal":{"S":"Now is the time for","Sp":"all good men to come to"},"nilVal":null,"xml":{"tag":{"-bool":"true","-one":"1","-pi":"3.1415962535"},"tagJR":{"-key":"value"}}} v: {"byteVal":"dGhlIGFpZCBvZiB0aGVpciBjb3VudHJ5","goofyVal":{"S":"Now is the time for","Sp":"all good men to come to"},"nilVal":null,"xml":{"tag":{"-bool":"true","-one":"1","-pi":"3.1415962535"},"tagJR":{"-key":"value"}}} TestGoofier ... MapToDoc: map[byteVal:[116 104 101 32 97 105 100 32 111 102 32 116 104 101 105 114 32 99 111 117 110 116 114 121] goofierVal:0xc0000808d0 goofyVal:0xc000096080 nilVal: xml:map[tag:map[-bool:true -one:1 -pi:3.1415962535] tagJR:map[-key:value]]] TestGoofier ... MapToDoc: map[byteVal:[116 104 101 32 97 105 100 32 111 102 32 116 104 101 105 114 32 99 111 117 110 116 114 121] goofierVal:0xc0000808d0 goofyVal:0xc000096080 nilVal: xml:map[tag:map[-bool:true -one:1 -pi:3.1415962535] tagJR:map[-key:value]]] v: {"byteVal":"dGhlIGFpZCBvZiB0aGVpciBjb3VudHJ5","goofierVal":{"G":{"S":"Now is the time for","Sp":"all good men to come to"},"B":"dGhlIHRyZWUgb2YgZnJlZWRvbSBtdXN0IHBlcmlvZGljYWxseSBiZQ==","N":null},"goofyVal":{"S":"Now is the time for","Sp":"all good men to come to"},"nilVal":null,"xml":{"tag":{"-bool":"true","-one":"1","-pi":"3.1415962535"},"tagJR":{"-key":"value"}}} v: {"byteVal":"dGhlIGFpZCBvZiB0aGVpciBjb3VudHJ5","goofierVal":{"G":{"S":"Now is the time for","Sp":"all good men to come to"},"B":"dGhlIHRyZWUgb2YgZnJlZWRvbSBtdXN0IHBlcmlvZGljYWxseSBiZQ==","N":null},"goofyVal":{"S":"Now is the time for","Sp":"all good men to come to"},"nilVal":null,"xml":{"tag":{"-bool":"true","-one":"1","-pi":"3.1415962535"},"tagJR":{"-key":"value"}}} ToTree - Read doc: barworld ToTree - Read doc: barworld entry : entry : vars : vars : foo : bar foo : bar foo2 : foo2 : hello : world hello : world ToMap - Read doc: barworld ToMap - Read doc: barworld entry : entry : vars : vars : foo :[string] bar foo :[string] bar foo2 : foo2 : hello :[string] world hello :[string] world ToJson - Read doc: barworld ToJson - Read doc: barworld json: {"entry":{"vars":{"foo":"bar","foo2":{"hello":"world"}}}} json: {"entry":{"vars":{"foo":"bar","foo2":{"hello":"world"}}}} ToJsonIndent - Read doc: barworld ToJsonIndent - Read doc: barworld json: { json: { "entry": { "entry": { "vars": { "vars": { "foo": "bar", "foo": "bar", "foo2": { "foo2": { "hello": "world" "hello": "world" } } } } } } } } BulkParser (with error) - Read doc: barworldanbarworld BulkParser (with error) - Read doc: barworldanbarworld phandler m: map[entry:map[vars:map[foo:bar foo2:map[hello:world]]]] phandler m: map[entry:map[vars:map[foo:bar foo2:map[hello:world]]]] ehandler err: XML syntax error on line 1: element closed by ehandler err: XML syntax error on line 1: element closed by phandler m: map[entry:map[vars:map[foo:bar foo2:map[hello:world]]]] phandler m: map[entry:map[vars:map[foo:bar foo2:map[hello:world]]]] BulkParser (with error) - Read doc: barworldanbarworld BulkParser (with error) - Read doc: barworldanbarworld phandlerj s: {"entry":{"vars":{"foo":"bar","foo2":{"hello":"world"}}}} phandlerj s: {"entry":{"vars":{"foo":"bar","foo2":{"hello":"world"}}}} ehandler err: XML syntax error on line 1: element closed by ehandler err: XML syntax error on line 1: element closed by phandlerj s: {"entry":{"vars":{"foo":"bar","foo2":{"hello":"world"}}}} phandlerj s: {"entry":{"vars":{"foo":"bar","foo2":{"hello":"world"}}}} ================================ x2j_test.go ... ================================ x2j_test.go ... =================== TestX2j ... =================== TestX2j ... XML doc: XML doc: help me! help me! Henry was a renegade Henry was a renegade Didn't like to play it safe Didn't like to play it safe One component at a time One component at a time There's got to be a better way There's got to be a better way Oh, people came from miles around Oh, people came from miles around Searching for a steady job Searching for a steady job Welcome to the Motor Town Welcome to the Motor Town Booming like an atom bomb Booming like an atom bomb Oh, Henry was the end of the story Oh, Henry was the end of the story Then everything went wrong Then everything went wrong And we'll return it to its former glory And we'll return it to its former glory But it just takes so long But it just takes so long It's going to take a long time It's going to take a long time It's going to take it, but we'll make it one day It's going to take it, but we'll make it one day It's going to take a long time It's going to take a long time It's going to take it, but we'll make it one day It's going to take it, but we'll make it one day DocToTree(): DocToTree(): msg : msg : -mtype : alert -mtype : alert -mpriority : 1 -mpriority : 1 text : help me! text : help me! song : song : -title : A Long Time -title : A Long Time -author : Mayer Hawthorne -author : Mayer Hawthorne verses : verses : verse : verse : -name : verse 1 -name : verse 1 -no : 1 -no : 1 line : line : -no : 1 -no : 1 #text : Henry was a renegade #text : Henry was a renegade line : line : -no : 2 -no : 2 #text : Didn't like to play it safe #text : Didn't like to play it safe line : line : -no : 3 -no : 3 #text : One component at a time #text : One component at a time line : line : -no : 4 -no : 4 #text : There's got to be a better way #text : There's got to be a better way line : line : -no : 5 -no : 5 #text : Oh, people came from miles around #text : Oh, people came from miles around line : line : -no : 6 -no : 6 #text : Searching for a steady job #text : Searching for a steady job line : line : -no : 7 -no : 7 #text : Welcome to the Motor Town #text : Welcome to the Motor Town line : line : -no : 8 -no : 8 #text : Booming like an atom bomb #text : Booming like an atom bomb verse : verse : -name : verse 2 -name : verse 2 -no : 2 -no : 2 line : line : -no : 1 -no : 1 #text : Oh, Henry was the end of the story #text : Oh, Henry was the end of the story line : line : -no : 2 -no : 2 #text : Then everything went wrong #text : Then everything went wrong line : line : -no : 3 -no : 3 #text : And we'll return it to its former glory #text : And we'll return it to its former glory line : line : -no : 4 -no : 4 #text : But it just takes so long #text : But it just takes so long chorus : chorus : line : line : -no : 1 -no : 1 #text : It's going to take a long time #text : It's going to take a long time line : line : -no : 2 -no : 2 #text : It's going to take it, but we'll make it one day #text : It's going to take it, but we'll make it one day line : line : -no : 3 -no : 3 #text : It's going to take a long time #text : It's going to take a long time line : line : -no : 4 -no : 4 #text : It's going to take it, but we'll make it one day #text : It's going to take it, but we'll make it one day treeToMap, recast==false: treeToMap, recast==false: msg : msg : -mtype :[string] alert -mtype :[string] alert -mpriority :[string] 1 -mpriority :[string] 1 text :[string] help me! text :[string] help me! song : song : -title :[string] A Long Time -title :[string] A Long Time -author :[string] Mayer Hawthorne -author :[string] Mayer Hawthorne verses : verses : verse :[[]interface{}] verse :[[]interface{}] [item: 0] [item: 0] -name :[string] verse 1 -name :[string] verse 1 -no :[string] 1 -no :[string] 1 line :[[]interface{}] line :[[]interface{}] [item: 0] [item: 0] -no :[string] 1 -no :[string] 1 #text :[string] Henry was a renegade #text :[string] Henry was a renegade [item: 1] [item: 1] -no :[string] 2 -no :[string] 2 #text :[string] Didn't like to play it safe #text :[string] Didn't like to play it safe [item: 2] [item: 2] -no :[string] 3 -no :[string] 3 #text :[string] One component at a time #text :[string] One component at a time [item: 3] [item: 3] -no :[string] 4 -no :[string] 4 #text :[string] There's got to be a better way #text :[string] There's got to be a better way [item: 4] [item: 4] -no :[string] 5 -no :[string] 5 #text :[string] Oh, people came from miles around #text :[string] Oh, people came from miles around [item: 5] [item: 5] -no :[string] 6 -no :[string] 6 #text :[string] Searching for a steady job #text :[string] Searching for a steady job [item: 6] [item: 6] -no :[string] 7 -no :[string] 7 #text :[string] Welcome to the Motor Town #text :[string] Welcome to the Motor Town [item: 7] [item: 7] -no :[string] 8 -no :[string] 8 #text :[string] Booming like an atom bomb #text :[string] Booming like an atom bomb [item: 1] [item: 1] -no :[string] 2 -no :[string] 2 line :[[]interface{}] line :[[]interface{}] [item: 0] [item: 0] -no :[string] 1 -no :[string] 1 #text :[string] Oh, Henry was the end of the story #text :[string] Oh, Henry was the end of the story [item: 1] [item: 1] -no :[string] 2 -no :[string] 2 #text :[string] Then everything went wrong #text :[string] Then everything went wrong [item: 2] [item: 2] -no :[string] 3 -no :[string] 3 #text :[string] And we'll return it to its former glory #text :[string] And we'll return it to its former glory [item: 3] [item: 3] #text :[string] But it just takes so long #text :[string] But it just takes so long -no :[string] 4 -no :[string] 4 -name :[string] verse 2 -name :[string] verse 2 chorus : chorus : line :[[]interface{}] line :[[]interface{}] [item: 0] [item: 0] -no :[string] 1 -no :[string] 1 #text :[string] It's going to take a long time #text :[string] It's going to take a long time [item: 1] [item: 1] -no :[string] 2 -no :[string] 2 #text :[string] It's going to take it, but we'll make it one day #text :[string] It's going to take it, but we'll make it one day [item: 2] [item: 2] -no :[string] 3 -no :[string] 3 #text :[string] It's going to take a long time #text :[string] It's going to take a long time [item: 3] [item: 3] -no :[string] 4 -no :[string] 4 #text :[string] It's going to take it, but we'll make it one day #text :[string] It's going to take it, but we'll make it one day json.MarshalIndent, recast==false: json.MarshalIndent, recast==false: { { "msg": { "msg": { "-mpriority": "1", "-mpriority": "1", "-mtype": "alert", "-mtype": "alert", "song": { "song": { "-author": "Mayer Hawthorne", "-author": "Mayer Hawthorne", "-title": "A Long Time", "-title": "A Long Time", "chorus": { "chorus": { "line": [ "line": [ { { "#text": "It's going to take a long time", "#text": "It's going to take a long time", "-no": "1" "-no": "1" }, }, { { "#text": "It's going to take it, but we'll make it one day", "#text": "It's going to take it, but we'll make it one day", "-no": "2" "-no": "2" }, }, { { "#text": "It's going to take a long time", "#text": "It's going to take a long time", "-no": "3" "-no": "3" }, }, { { "#text": "It's going to take it, but we'll make it one day", "#text": "It's going to take it, but we'll make it one day", "-no": "4" "-no": "4" } } ] ] }, }, "verses": { "verses": { "verse": [ "verse": [ { { "-name": "verse 1", "-name": "verse 1", "-no": "1", "-no": "1", "line": [ "line": [ { { "#text": "Henry was a renegade", "#text": "Henry was a renegade", "-no": "1" "-no": "1" }, }, { { "#text": "Didn't like to play it safe", "#text": "Didn't like to play it safe", "-no": "2" "-no": "2" }, }, { { "#text": "One component at a time", "#text": "One component at a time", "-no": "3" "-no": "3" }, }, { { "#text": "There's got to be a better way", "#text": "There's got to be a better way", "-no": "4" "-no": "4" }, }, { { "#text": "Oh, people came from miles around", "#text": "Oh, people came from miles around", "-no": "5" "-no": "5" }, }, { { "#text": "Searching for a steady job", "#text": "Searching for a steady job", "-no": "6" "-no": "6" }, }, { { "#text": "Welcome to the Motor Town", "#text": "Welcome to the Motor Town", "-no": "7" "-no": "7" }, }, { { "#text": "Booming like an atom bomb", "#text": "Booming like an atom bomb", "-no": "8" "-no": "8" } } ] ] }, }, { { "-name": "verse 2", "-name": "verse 2", "-no": "2", "-no": "2", "line": [ "line": [ { { "#text": "Oh, Henry was the end of the story", "#text": "Oh, Henry was the end of the story", "-no": "1" "-no": "1" }, }, { { "#text": "Then everything went wrong", "#text": "Then everything went wrong", "-no": "2" "-no": "2" }, }, { { "#text": "And we'll return it to its former glory", "#text": "And we'll return it to its former glory", "-no": "3" "-no": "3" }, }, { { "#text": "But it just takes so long", "#text": "But it just takes so long", "-no": "4" "-no": "4" } } ] ] } } ] ] } } }, }, "text": "help me!" "text": "help me!" } } } } DocToMap(), recast==true: DocToMap(), recast==true: msg : msg : -mtype :[string] alert -mtype :[string] alert -mpriority :[float64] 1.00e+00 -mpriority :[float64] 1.00e+00 text :[string] help me! text :[string] help me! song : song : -title :[string] A Long Time -title :[string] A Long Time -author :[string] Mayer Hawthorne -author :[string] Mayer Hawthorne verses : verses : verse :[[]interface{}] verse :[[]interface{}] [item: 0] [item: 0] -no :[float64] 1.00e+00 -no :[float64] 1.00e+00 line :[[]interface{}] line :[[]interface{}] [item: 0] [item: 0] -no :[float64] 1.00e+00 -no :[float64] 1.00e+00 #text :[string] Henry was a renegade #text :[string] Henry was a renegade [item: 1] [item: 1] -no :[float64] 2.00e+00 -no :[float64] 2.00e+00 #text :[string] Didn't like to play it safe #text :[string] Didn't like to play it safe [item: 2] [item: 2] -no :[float64] 3.00e+00 -no :[float64] 3.00e+00 #text :[string] One component at a time #text :[string] One component at a time [item: 3] [item: 3] -no :[float64] 4.00e+00 -no :[float64] 4.00e+00 #text :[string] There's got to be a better way #text :[string] There's got to be a better way [item: 4] [item: 4] -no :[float64] 5.00e+00 -no :[float64] 5.00e+00 #text :[string] Oh, people came from miles around #text :[string] Oh, people came from miles around [item: 5] [item: 5] -no :[float64] 6.00e+00 -no :[float64] 6.00e+00 #text :[string] Searching for a steady job #text :[string] Searching for a steady job [item: 6] [item: 6] #text :[string] Welcome to the Motor Town #text :[string] Welcome to the Motor Town -no :[float64] 7.00e+00 -no :[float64] 7.00e+00 [item: 7] [item: 7] #text :[string] Booming like an atom bomb #text :[string] Booming like an atom bomb -no :[float64] 8.00e+00 -no :[float64] 8.00e+00 -name :[string] verse 1 -name :[string] verse 1 [item: 1] [item: 1] -no :[float64] 2.00e+00 -no :[float64] 2.00e+00 line :[[]interface{}] line :[[]interface{}] [item: 0] [item: 0] -no :[float64] 1.00e+00 -no :[float64] 1.00e+00 #text :[string] Oh, Henry was the end of the story #text :[string] Oh, Henry was the end of the story [item: 1] [item: 1] -no :[float64] 2.00e+00 -no :[float64] 2.00e+00 #text :[string] Then everything went wrong #text :[string] Then everything went wrong [item: 2] [item: 2] -no :[float64] 3.00e+00 -no :[float64] 3.00e+00 #text :[string] And we'll return it to its former glory #text :[string] And we'll return it to its former glory [item: 3] [item: 3] -no :[float64] 4.00e+00 -no :[float64] 4.00e+00 #text :[string] But it just takes so long #text :[string] But it just takes so long -name :[string] verse 2 -name :[string] verse 2 chorus : chorus : line :[[]interface{}] line :[[]interface{}] [item: 0] [item: 0] -no :[float64] 1.00e+00 -no :[float64] 1.00e+00 #text :[string] It's going to take a long time #text :[string] It's going to take a long time [item: 1] [item: 1] -no :[float64] 2.00e+00 -no :[float64] 2.00e+00 #text :[string] It's going to take it, but we'll make it one day #text :[string] It's going to take it, but we'll make it one day [item: 2] [item: 2] -no :[float64] 3.00e+00 -no :[float64] 3.00e+00 #text :[string] It's going to take a long time #text :[string] It's going to take a long time [item: 3] [item: 3] -no :[float64] 4.00e+00 -no :[float64] 4.00e+00 #text :[string] It's going to take it, but we'll make it one day #text :[string] It's going to take it, but we'll make it one day DocToJsonIndent, recast==true: DocToJsonIndent, recast==true: { { "msg": { "msg": { "-mpriority": 1, "-mpriority": 1, "-mtype": "alert", "-mtype": "alert", "song": { "song": { "-author": "Mayer Hawthorne", "-author": "Mayer Hawthorne", "-title": "A Long Time", "-title": "A Long Time", "chorus": { "chorus": { "line": [ "line": [ { { "#text": "It's going to take a long time", "#text": "It's going to take a long time", "-no": 1 "-no": 1 }, }, { { "#text": "It's going to take it, but we'll make it one day", "#text": "It's going to take it, but we'll make it one day", "-no": 2 "-no": 2 }, }, { { "#text": "It's going to take a long time", "#text": "It's going to take a long time", "-no": 3 "-no": 3 }, }, { { "#text": "It's going to take it, but we'll make it one day", "#text": "It's going to take it, but we'll make it one day", "-no": 4 "-no": 4 } } ] ] }, }, "verses": { "verses": { "verse": [ "verse": [ { { "-name": "verse 1", "-name": "verse 1", "-no": 1, "-no": 1, "line": [ "line": [ { { "#text": "Henry was a renegade", "#text": "Henry was a renegade", "-no": 1 "-no": 1 }, }, { { "#text": "Didn't like to play it safe", "#text": "Didn't like to play it safe", "-no": 2 "-no": 2 }, }, { { "#text": "One component at a time", "#text": "One component at a time", "-no": 3 "-no": 3 }, }, { { "#text": "There's got to be a better way", "#text": "There's got to be a better way", "-no": 4 "-no": 4 }, }, { { "#text": "Oh, people came from miles around", "#text": "Oh, people came from miles around", "-no": 5 "-no": 5 }, }, { { "#text": "Searching for a steady job", "#text": "Searching for a steady job", "-no": 6 "-no": 6 }, }, { { "#text": "Welcome to the Motor Town", "#text": "Welcome to the Motor Town", "-no": 7 "-no": 7 }, }, { { "#text": "Booming like an atom bomb", "#text": "Booming like an atom bomb", "-no": 8 "-no": 8 } } ] ] }, }, { { "-name": "verse 2", "-name": "verse 2", "-no": 2, "-no": 2, "line": [ "line": [ { { "#text": "Oh, Henry was the end of the story", "#text": "Oh, Henry was the end of the story", "-no": 1 "-no": 1 }, }, { { "#text": "Then everything went wrong", "#text": "Then everything went wrong", "-no": 2 "-no": 2 }, }, { { "#text": "And we'll return it to its former glory", "#text": "And we'll return it to its former glory", "-no": 3 "-no": 3 }, }, { { "#text": "But it just takes so long", "#text": "But it just takes so long", "-no": 4 "-no": 4 } } ] ] } } ] ] } } }, }, "text": "help me!" "text": "help me!" } } } } =================== TestGetValue ... =================== TestGetValue ... Read doc: barworld Read doc: barworld Looking for value: entry.vars Looking for value: entry.vars { { "foo": "bar", "foo": "bar", "foo2": { "foo2": { "hello": "world" "hello": "world" } } } } Looking for value: entry.vars.foo2.hello Looking for value: entry.vars.foo2.hello world world Looking with error in path: entry.var Looking with error in path: entry.var verr: no key in map: var verr: no key in map: var DocValue() for tag path entry.vars DocValue() for tag path entry.vars { { "foo": "bar", "foo": "bar", "foo2": { "foo2": { "hello": "world" "hello": "world" } } } } =================== TestGetValueWithAttr ... =================== TestGetValueWithAttr ... Read doc: Read doc: bar bar world world universe universe Looking for value: entry.vars Looking for value: entry.vars { { "foo": [ "foo": [ { { "#text": "bar", "#text": "bar", "-item": "1" "-item": "1" }, }, { { "-item": "2", "-item": "2", "hello": [ "hello": [ { { "#text": "world", "#text": "world", "-item": "3" "-item": "3" }, }, { { "#text": "universe", "#text": "universe", "-item": "4" "-item": "4" } } ] ] } } ] ] } } MapValue(): Looking for value: entry.vars.foo item=2 MapValue(): Looking for value: entry.vars.foo item=2 { { "-item": "2", "-item": "2", "hello": [ "hello": [ { { "#text": "world", "#text": "world", "-item": "3" "-item": "3" }, }, { { "#text": "universe", "#text": "universe", "-item": "4" "-item": "4" } } ] ] } } MapValue(): Looking for hello item:4 MapValue(): Looking for hello item:4 verr: no key in map: hello verr: no key in map: hello DocValue(): Looking for entry.vars.foo.hello item:4 DocValue(): Looking for entry.vars.foo.hello item:4 verr: no keys beyond: foo verr: no keys beyond: foo DocValue(): Looking for empty nil DocValue(): Looking for empty nil { { "entry": { "entry": { "vars": { "vars": { "foo": [ "foo": [ { { "#text": "bar", "#text": "bar", "-item": "1" "-item": "1" }, }, { { "-item": "2", "-item": "2", "hello": [ "hello": [ { { "#text": "world", "#text": "world", "-item": "3" "-item": "3" }, }, { { "#text": "universe", "#text": "universe", "-item": "4" "-item": "4" } } ] ] } } ] ] } } } } } } testing recast switch... testing recast switch... MapValue(): Looking for value: entry.vars.foo item=2 MapValue(): Looking for value: entry.vars.foo item=2 { { "-item": 2, "-item": 2, "hello": [ "hello": [ { { "#text": "world", "#text": "world", "-item": 3 "-item": 3 }, }, { { "#text": "universe", "#text": "universe", "-item": 4 "-item": 4 } } ] ] } } =================== TestStuff_1 ... =================== TestStuff_1 ... val2 val2 val2 val2 val3 val3 doc : doc : tag :[[]interface{}] tag :[[]interface{}] [item: 0] [item: 0] -item :[string] 1 -item :[string] 1 #text :[string] val2 #text :[string] val2 [item: 1] [item: 1] -item :[string] 2 -item :[string] 2 #text :[string] val2 #text :[string] val2 [item: 2] [item: 2] -item :[string] 2 -item :[string] 2 -instance :[string] 2 -instance :[string] 2 #text :[string] val3 #text :[string] val3 DocValue(): tag DocValue(): tag [ [ { { "#text": "val2", "#text": "val2", "-item": "1" "-item": "1" }, }, { { "#text": "val2", "#text": "val2", "-item": "2" "-item": "2" }, }, { { "#text": "val3", "#text": "val3", "-instance": "2", "-instance": "2", "-item": "2" "-item": "2" } } ] ] DocValue(): item:2 instance:2 DocValue(): item:2 instance:2 "val3" "val3" =================== TestStuff_2 ... =================== TestStuff_2 ... val2 val2 val2 val2 val3 val3 tag : tag : -item :[string] 1 -item :[string] 1 #text :[string] val2 #text :[string] val2 DocValue(): tag DocValue(): tag { { "#text": "val2", "#text": "val2", "-item": "1" "-item": "1" } } DocValue(): item:2 instance:2 DocValue(): item:2 instance:2 verr: no attribute key:value pair: item:2 verr: no attribute key:value pair: item:2 =================== TestBulkBuffer ... =================== TestBulkBuffer ... Bulk Message Processing Tests Bulk Message Processing Tests procMap: { procMap: { "msg": { "msg": { "-mpriority": "1", "-mpriority": "1", "-mtype": "alert", "-mtype": "alert", "song": { "song": { "-author": "Mayer Hawthorne", "-author": "Mayer Hawthorne", "-title": "A Long Time", "-title": "A Long Time", "chorus": { "chorus": { "line": [ "line": [ { { "#text": "It's going to take a long time", "#text": "It's going to take a long time", "-no": "1" "-no": "1" }, }, { { "#text": "It's going to take it, but we'll make it one day", "#text": "It's going to take it, but we'll make it one day", "-no": "2" "-no": "2" }, }, { { "#text": "It's going to take a long time", "#text": "It's going to take a long time", "-no": "3" "-no": "3" }, }, { { "#text": "It's going to take it, but we'll make it one day", "#text": "It's going to take it, but we'll make it one day", "-no": "4" "-no": "4" } } ] ] }, }, "verses": { "verses": { "verse": [ "verse": [ { { "-name": "verse 1", "-name": "verse 1", "-no": "1", "-no": "1", "line": [ "line": [ { { "#text": "Henry was a renegade", "#text": "Henry was a renegade", "-no": "1" "-no": "1" }, }, { { "#text": "Didn't like to play it safe", "#text": "Didn't like to play it safe", "-no": "2" "-no": "2" }, }, { { "#text": "One component at a time", "#text": "One component at a time", "-no": "3" "-no": "3" }, }, { { "#text": "There's got to be a better way", "#text": "There's got to be a better way", "-no": "4" "-no": "4" }, }, { { "#text": "Oh, people came from miles around", "#text": "Oh, people came from miles around", "-no": "5" "-no": "5" }, }, { { "#text": "Searching for a steady job", "#text": "Searching for a steady job", "-no": "6" "-no": "6" }, }, { { "#text": "Welcome to the Motor Town", "#text": "Welcome to the Motor Town", "-no": "7" "-no": "7" }, }, { { "#text": "Booming like an atom bomb", "#text": "Booming like an atom bomb", "-no": "8" "-no": "8" } } ] ] }, }, { { "-name": "verse 2", "-name": "verse 2", "-no": "2", "-no": "2", "line": [ "line": [ { { "#text": "Oh, Henry was the end of the story", "#text": "Oh, Henry was the end of the story", "-no": "1" "-no": "1" }, }, { { "#text": "Then everything went wrong", "#text": "Then everything went wrong", "-no": "2" "-no": "2" }, }, { { "#text": "And we'll return it to its former glory", "#text": "And we'll return it to its former glory", "-no": "3" "-no": "3" }, }, { { "#text": "But it just takes so long", "#text": "But it just takes so long", "-no": "4" "-no": "4" } } ] ] } } ] ] } } }, }, "text": "help me!" "text": "help me!" } } } } procMap: { procMap: { "msg": { "msg": { "-mpriority": "1", "-mpriority": "1", "-mtype": "alert", "-mtype": "alert", "song": { "song": { "-author": "Mayer Hawthorne", "-author": "Mayer Hawthorne", "-title": "A Long Time", "-title": "A Long Time", "verses": { "verses": { "verse": { "verse": { "-name": "verse 1", "-name": "verse 1", "-no": "1", "-no": "1", "line": [ "line": [ { { "#text": "Henry was a renegade", "#text": "Henry was a renegade", "-no": "1" "-no": "1" }, }, { { "#text": "Didn't like to play it safe", "#text": "Didn't like to play it safe", "-no": "2" "-no": "2" }, }, { { "#text": "One component at a time", "#text": "One component at a time", "-no": "3" "-no": "3" }, }, { { "#text": "There's got to be a better way", "#text": "There's got to be a better way", "-no": "4" "-no": "4" }, }, { { "#text": "Oh, people came from miles around", "#text": "Oh, people came from miles around", "-no": "5" "-no": "5" }, }, { { "#text": "Searching for a steady job", "#text": "Searching for a steady job", "-no": "6" "-no": "6" }, }, { { "#text": "Welcome to the Motor Town", "#text": "Welcome to the Motor Town", "-no": "7" "-no": "7" }, }, { { "#text": "Booming like an atom bomb", "#text": "Booming like an atom bomb", "-no": "8" "-no": "8" } } ] ] } } } } }, }, "text": "help me!" "text": "help me!" } } } } procMap: { procMap: { "msg": { "msg": { "-mpriority": "1", "-mpriority": "1", "-mtype": "alert", "-mtype": "alert", "song": { "song": { "-author": "Mayer Hawthorne", "-author": "Mayer Hawthorne", "-title": "A Long Time", "-title": "A Long Time", "chorus": { "chorus": { "line": [ "line": [ { { "#text": "It's going to take a long time", "#text": "It's going to take a long time", "-no": "1" "-no": "1" }, }, { { "#text": "It's going to take it, but we'll make it one day", "#text": "It's going to take it, but we'll make it one day", "-no": "2" "-no": "2" }, }, { { "#text": "It's going to take a long time", "#text": "It's going to take a long time", "-no": "3" "-no": "3" }, }, { { "#text": "It's going to take it, but we'll make it one day", "#text": "It's going to take it, but we'll make it one day", "-no": "4" "-no": "4" } } ] ] } } }, }, "text": "help me!" "text": "help me!" } } } } procError err: XML syntax error on line 1: element closed by procError err: XML syntax error on line 1: element closed by procError err: XML syntax error on line 1: unexpected end element procError err: XML syntax error on line 1: unexpected end element =================== TestBulkBuffer ... =================== TestBulkBuffer ... Test arbitrary XML buffer with no ending rootTag - then read from closed buffer. Test arbitrary XML buffer with no ending rootTag - then read from closed buffer. m: map[doc:map[tag:]] m: map[doc:map[tag:]] m: map[doc:map[one:map[#text:my test doc -att:1]]] m: map[doc:map[one:map[#text:my test doc -att:1]]] merr: XML syntax error on line 1: unexpected EOF merr: XML syntax error on line 1: unexpected EOF err: Buffer is not active. err: Buffer is not active. =================== TestTagAndKey ... =================== TestTagAndKey ... TestTagAndKey() TestTagAndKey()
one
one
two.one two.one two.two two.two
one
one
two
two
tag: parts :: len: 2 v: [map[part:[two.one two.two]] map[sections:map[section:[one two]]]] tag: parts :: len: 2 v: [map[part:[two.one two.two]] map[sections:map[section:[one two]]]] no 'not_a_tag' tag no 'not_a_tag' tag key: section :: len: 2 v: [[one map[parts:map[part:[two.one two.two]]]] [one two]] key: section :: len: 2 v: [[one map[parts:map[part:[two.one two.two]]]] [one two]] no 'not_a_key' key no 'not_a_key' key ============================ x2jat_test.go ============================ x2jat_test.go =============== TestValuesAtKeyPath ... =============== TestValuesAtKeyPath ... ValuesAtKeyPath ... doc1#author ValuesAtKeyPath ... doc1#author ss: [doc.books.book.author] ss: [doc.books.book.author] vv: [map[-seq:1 author:William H. Gaddis review:One of the great seminal American novels of the 20th century. title:The Recognitions] map[-seq:2 author:Austin Tappan Wright review:An example of earlier 20th century American utopian fiction. title:Islandia] map[-seq:3 author:John Hawkes review:A lyrical novel about the construction of Ft. Peck Dam in Montana. title:The Beetle Leg] map[-seq:4 author:map[first_name:T.E. last_name:Porter] review:A magical novella. title:King's Day]] vv: [map[-seq:1 author:William H. Gaddis review:One of the great seminal American novels of the 20th century. title:The Recognitions] map[-seq:2 author:Austin Tappan Wright review:An example of earlier 20th century American utopian fiction. title:Islandia] map[-seq:3 author:John Hawkes review:A lyrical novel about the construction of Ft. Peck Dam in Montana. title:The Beetle Leg] map[-seq:4 author:map[first_name:T.E. last_name:Porter] review:A magical novella. title:King's Day]] ValuesAtKeyPath ... doc1#first_name ValuesAtKeyPath ... doc1#first_name ss: [doc.books.book.author.first_name] ss: [doc.books.book.author.first_name] vv: [William H. Gaddis Austin Tappan Wright John Hawkes map[first_name:T.E. last_name:Porter]] vv: [William H. Gaddis Austin Tappan Wright John Hawkes map[first_name:T.E. last_name:Porter]] GetKeyPaths...doc2#book GetKeyPaths...doc2#book ss: [doc.books.author.book doc.books.author.books.book] ss: [doc.books.author.book doc.books.author.books.book] vv: [map[book:[map[-seq:1 review:One of the great seminal American novels of the 20th century. title:The Recognitions] map[review:Won the National Book Award title:JR]] name:William H. Gaddis] map[books:map[book:[map[title:The Beetle Leg] map[title:The Blood Oranges]]] name:John Hawkes]] vv: [map[book:[map[-seq:1 review:One of the great seminal American novels of the 20th century. title:The Recognitions] map[review:Won the National Book Award title:JR]] name:William H. Gaddis] map[books:map[book:[map[title:The Beetle Leg] map[title:The Blood Oranges]]] name:John Hawkes]] vv: [map[book:[map[title:The Beetle Leg] map[title:The Blood Oranges]]]] vv: [map[book:[map[title:The Beetle Leg] map[title:The Blood Oranges]]]] vv,shortest_path: [map[book:[map[-seq:1 review:One of the great seminal American novels of the 20th century. title:The Recognitions] map[review:Won the National Book Award title:JR]] name:William H. Gaddis] map[books:map[book:[map[title:The Beetle Leg] map[title:The Blood Oranges]]] name:John Hawkes]] vv,shortest_path: [map[book:[map[-seq:1 review:One of the great seminal American novels of the 20th century. title:The Recognitions] map[review:Won the National Book Award title:JR]] name:William H. Gaddis] map[books:map[book:[map[title:The Beetle Leg] map[title:The Blood Oranges]]] name:John Hawkes]] ValuesAtKeyPath ... msg1#pub ValuesAtKeyPath ... msg1#pub ss: [msg.pub] ss: [msg.pub] vv: [map[pub:test text:This is a long cold winter]] vv: [map[pub:test text:This is a long cold winter]] ValuesAtKeyPath ... msg2#pub ValuesAtKeyPath ... msg2#pub ss: [msgs.msg.pub] ss: [msgs.msg.pub] vv: [map[pub:test text:This is a long cold winter] map[pub:test2 text:I hope we have a cool summer, though]] vv: [map[pub:test text:This is a long cold winter] map[pub:test2 text:I hope we have a cool summer, though]] =============== TestValuesAtTagPath ... =============== TestValuesAtTagPath ... ValuesAtTagPath ... doc1#author ValuesAtTagPath ... doc1#author ss: [doc.books.book.author] ss: [doc.books.book.author] vv: [map[-seq:1 author:William H. Gaddis review:One of the great seminal American novels of the 20th century. title:The Recognitions] map[-seq:2 author:Austin Tappan Wright review:An example of earlier 20th century American utopian fiction. title:Islandia] map[-seq:3 author:John Hawkes review:A lyrical novel about the construction of Ft. Peck Dam in Montana. title:The Beetle Leg] map[-seq:4 author:map[first_name:T.E. last_name:Porter] review:A magical novella. title:King's Day]] vv: [map[-seq:1 author:William H. Gaddis review:One of the great seminal American novels of the 20th century. title:The Recognitions] map[-seq:2 author:Austin Tappan Wright review:An example of earlier 20th century American utopian fiction. title:Islandia] map[-seq:3 author:John Hawkes review:A lyrical novel about the construction of Ft. Peck Dam in Montana. title:The Beetle Leg] map[-seq:4 author:map[first_name:T.E. last_name:Porter] review:A magical novella. title:King's Day]] ValuesAtTagPath ... doc1#first_name ValuesAtTagPath ... doc1#first_name ss: [doc.books.book.author.first_name] ss: [doc.books.book.author.first_name] vv: [William H. Gaddis Austin Tappan Wright John Hawkes map[first_name:T.E. last_name:Porter]] vv: [William H. Gaddis Austin Tappan Wright John Hawkes map[first_name:T.E. last_name:Porter]] ValuesAtTagPath...doc2#book ValuesAtTagPath...doc2#book ss: [doc.books.author.book doc.books.author.books.book] ss: [doc.books.author.book doc.books.author.books.book] vv: [map[book:[map[-seq:1 review:One of the great seminal American novels of the 20th century. title:The Recognitions] map[review:Won the National Book Award title:JR]] name:William H. Gaddis] map[books:map[book:[map[title:The Beetle Leg] map[title:The Blood Oranges]]] name:John Hawkes]] vv: [map[book:[map[-seq:1 review:One of the great seminal American novels of the 20th century. title:The Recognitions] map[review:Won the National Book Award title:JR]] name:William H. Gaddis] map[books:map[book:[map[title:The Beetle Leg] map[title:The Blood Oranges]]] name:John Hawkes]] vv: [map[book:[map[title:The Beetle Leg] map[title:The Blood Oranges]]]] vv: [map[book:[map[title:The Beetle Leg] map[title:The Blood Oranges]]]] vv,shortest_path: [map[book:[map[-seq:1 review:One of the great seminal American novels of the 20th century. title:The Recognitions] map[review:Won the National Book Award title:JR]] name:William H. Gaddis] map[books:map[book:[map[title:The Beetle Leg] map[title:The Blood Oranges]]] name:John Hawkes]] vv,shortest_path: [map[book:[map[-seq:1 review:One of the great seminal American novels of the 20th century. title:The Recognitions] map[review:Won the National Book Award title:JR]] name:William H. Gaddis] map[books:map[book:[map[title:The Beetle Leg] map[title:The Blood Oranges]]] name:John Hawkes]] ================================ x2jfindPath_test.go ================================ x2jfindPath_test.go =============== TestPathsForKey ... =============== TestPathsForKey ... PathsForKey... doc01#author PathsForKey... doc01#author ss: [doc.books.book.author] ss: [doc.books.book.author] PathsForKey... doc01#books PathsForKey... doc01#books ss: [doc.books] ss: [doc.books] PathsForKey...doc02#book PathsForKey...doc02#book ss: [doc.books.author.book doc.books.author.books.book] ss: [doc.books.author.book doc.books.author.books.book] PathForKeyShortest...doc02#book PathForKeyShortest...doc02#book s: doc.books.author.book s: doc.books.author.book =============== TestPathsForTag ... =============== TestPathsForTag ... PathsForTag... doc01#author PathsForTag... doc01#author ss: [doc.books.book.author] ss: [doc.books.book.author] PathsForTag... doc01#books PathsForTag... doc01#books ss: [doc.books] ss: [doc.books] PathsForTag...doc02#book PathsForTag...doc02#book ss: [doc.books.author.books.book doc.books.author.book] ss: [doc.books.author.books.book doc.books.author.book] PathForTagShortest...doc02#book PathForTagShortest...doc02#book s: doc.books.author.book s: doc.books.author.book TestValuesFromTagPath() TestValuesFromTagPath() William H. Gaddis William H. Gaddis The Recognitions The Recognitions One of the great seminal American novels of the 20th century. One of the great seminal American novels of the 20th century. Austin Tappan Wright Austin Tappan Wright Islandia Islandia An example of earlier 20th century American utopian fiction. An example of earlier 20th century American utopian fiction. John Hawkes John Hawkes The Beetle Leg The Beetle Leg A lyrical novel about the construction of Ft. Peck Dam in Montana. A lyrical novel about the construction of Ft. Peck Dam in Montana. T.E. T.E. Porter Porter King's Day King's Day A magical novella. A magical novella. map: map: doc : doc : books : books : book :[[]interface{}] book :[[]interface{}] [item: 0] [item: 0] title :[string] The Recognitions title :[string] The Recognitions review :[string] One of the great seminal American novels of the 20th century. review :[string] One of the great seminal American novels of the 20th century. -seq :[string] 1 -seq :[string] 1 author :[string] William H. Gaddis author :[string] William H. Gaddis [item: 1] [item: 1] -seq :[string] 2 -seq :[string] 2 author :[string] Austin Tappan Wright author :[string] Austin Tappan Wright title :[string] Islandia title :[string] Islandia review :[string] An example of earlier 20th century American utopian fiction. review :[string] An example of earlier 20th century American utopian fiction. [item: 2] [item: 2] author :[string] John Hawkes author :[string] John Hawkes title :[string] The Beetle Leg title :[string] The Beetle Leg review :[string] A lyrical novel about the construction of Ft. Peck Dam in Montana. review :[string] A lyrical novel about the construction of Ft. Peck Dam in Montana. -seq :[string] 3 -seq :[string] 3 [item: 3] [item: 3] -seq :[string] 4 -seq :[string] 4 author : author : first_name :[string] T.E. first_name :[string] T.E. last_name :[string] Porter last_name :[string] Porter title :[string] King's Day title :[string] King's Day review :[string] A magical novella. review :[string] A magical novella. path == doc.books: len(v): 1 path == doc.books: len(v): 1 0 : map[book:[map[-seq:1 author:William H. Gaddis review:One of the great seminal American novels of the 20th century. title:The Recognitions] map[-seq:2 author:Austin Tappan Wright review:An example of earlier 20th century American utopian fiction. title:Islandia] map[-seq:3 author:John Hawkes review:A lyrical novel about the construction of Ft. Peck Dam in Montana. title:The Beetle Leg] map[-seq:4 author:map[first_name:T.E. last_name:Porter] review:A magical novella. title:King's Day]]] 0 : map[book:[map[-seq:1 author:William H. Gaddis review:One of the great seminal American novels of the 20th century. title:The Recognitions] map[-seq:2 author:Austin Tappan Wright review:An example of earlier 20th century American utopian fiction. title:Islandia] map[-seq:3 author:John Hawkes review:A lyrical novel about the construction of Ft. Peck Dam in Montana. title:The Beetle Leg] map[-seq:4 author:map[first_name:T.E. last_name:Porter] review:A magical novella. title:King's Day]]] path == doc.books.*: len(v): 4 path == doc.books.*: len(v): 4 0 : map[-seq:1 author:William H. Gaddis review:One of the great seminal American novels of the 20th century. title:The Recognitions] 0 : map[-seq:1 author:William H. Gaddis review:One of the great seminal American novels of the 20th century. title:The Recognitions] 1 : map[-seq:2 author:Austin Tappan Wright review:An example of earlier 20th century American utopian fiction. title:Islandia] 1 : map[-seq:2 author:Austin Tappan Wright review:An example of earlier 20th century American utopian fiction. title:Islandia] 2 : map[-seq:3 author:John Hawkes review:A lyrical novel about the construction of Ft. Peck Dam in Montana. title:The Beetle Leg] 2 : map[-seq:3 author:John Hawkes review:A lyrical novel about the construction of Ft. Peck Dam in Montana. title:The Beetle Leg] 3 : map[-seq:4 author:map[first_name:T.E. last_name:Porter] review:A magical novella. title:King's Day] 3 : map[-seq:4 author:map[first_name:T.E. last_name:Porter] review:A magical novella. title:King's Day] path == doc.books.book: len(v): 4 path == doc.books.book: len(v): 4 0 : map[-seq:1 author:William H. Gaddis review:One of the great seminal American novels of the 20th century. title:The Recognitions] 0 : map[-seq:1 author:William H. Gaddis review:One of the great seminal American novels of the 20th century. title:The Recognitions] 1 : map[-seq:2 author:Austin Tappan Wright review:An example of earlier 20th century American utopian fiction. title:Islandia] 1 : map[-seq:2 author:Austin Tappan Wright review:An example of earlier 20th century American utopian fiction. title:Islandia] 2 : map[-seq:3 author:John Hawkes review:A lyrical novel about the construction of Ft. Peck Dam in Montana. title:The Beetle Leg] 2 : map[-seq:3 author:John Hawkes review:A lyrical novel about the construction of Ft. Peck Dam in Montana. title:The Beetle Leg] 3 : map[-seq:4 author:map[first_name:T.E. last_name:Porter] review:A magical novella. title:King's Day] 3 : map[-seq:4 author:map[first_name:T.E. last_name:Porter] review:A magical novella. title:King's Day] doc == doc2 / path == doc.books.book: len(v): 1 doc == doc2 / path == doc.books.book: len(v): 1 0 : map[-seq:1 author:William H. Gaddis review:One of the great seminal American novels of the 20th century. title:The Recognitions] 0 : map[-seq:1 author:William H. Gaddis review:One of the great seminal American novels of the 20th century. title:The Recognitions] path == doc.books.book.*: len(v): 12 path == doc.books.book.*: len(v): 12 0 : William H. Gaddis 0 : William H. Gaddis 1 : The Recognitions 1 : The Recognitions 2 : One of the great seminal American novels of the 20th century. 2 : One of the great seminal American novels of the 20th century. 3 : Austin Tappan Wright 3 : Austin Tappan Wright 4 : Islandia 4 : Islandia 5 : An example of earlier 20th century American utopian fiction. 5 : An example of earlier 20th century American utopian fiction. 6 : John Hawkes 6 : John Hawkes 7 : The Beetle Leg 7 : The Beetle Leg 8 : A lyrical novel about the construction of Ft. Peck Dam in Montana. 8 : A lyrical novel about the construction of Ft. Peck Dam in Montana. 9 : map[first_name:T.E. last_name:Porter] 9 : map[first_name:T.E. last_name:Porter] 10 : King's Day 10 : King's Day 11 : A magical novella. 11 : A magical novella. doc == doc2 / path == doc.books.book.*: len(v): 3 doc == doc2 / path == doc.books.book.*: len(v): 3 0 : William H. Gaddis 0 : William H. Gaddis 1 : The Recognitions 1 : The Recognitions 2 : One of the great seminal American novels of the 20th century. 2 : One of the great seminal American novels of the 20th century. path == doc.books.*.author: len(v): 4 path == doc.books.*.author: len(v): 4 0 : William H. Gaddis 0 : William H. Gaddis 1 : Austin Tappan Wright 1 : Austin Tappan Wright 2 : John Hawkes 2 : John Hawkes 3 : map[first_name:T.E. last_name:Porter] 3 : map[first_name:T.E. last_name:Porter] path == doc.*.*.author: len(v): 4 path == doc.*.*.author: len(v): 4 0 : William H. Gaddis 0 : William H. Gaddis 1 : Austin Tappan Wright 1 : Austin Tappan Wright 2 : John Hawkes 2 : John Hawkes 3 : map[first_name:T.E. last_name:Porter] 3 : map[first_name:T.E. last_name:Porter] path == doc.*.*.title: len(v): 4 path == doc.*.*.title: len(v): 4 0 : The Recognitions 0 : The Recognitions 1 : Islandia 1 : Islandia 2 : The Beetle Leg 2 : The Beetle Leg 3 : King's Day 3 : King's Day path == doc.*.*.*: len(v): 12 path == doc.*.*.*: len(v): 12 0 : The Recognitions 0 : The Recognitions 1 : One of the great seminal American novels of the 20th century. 1 : One of the great seminal American novels of the 20th century. 2 : William H. Gaddis 2 : William H. Gaddis 3 : Austin Tappan Wright 3 : Austin Tappan Wright 4 : Islandia 4 : Islandia 5 : An example of earlier 20th century American utopian fiction. 5 : An example of earlier 20th century American utopian fiction. 6 : A lyrical novel about the construction of Ft. Peck Dam in Montana. 6 : A lyrical novel about the construction of Ft. Peck Dam in Montana. 7 : John Hawkes 7 : John Hawkes 8 : The Beetle Leg 8 : The Beetle Leg 9 : map[first_name:T.E. last_name:Porter] 9 : map[first_name:T.E. last_name:Porter] 10 : King's Day 10 : King's Day 11 : A magical novella. 11 : A magical novella. path == doc.*.*.*.*: len(v): 2 path == doc.*.*.*.*: len(v): 2 0 : T.E. 0 : T.E. 1 : Porter 1 : Porter TestValuesFromTagPath2(), iteration: 0 TestValuesFromTagPath2(), iteration: 0 no no default:text default:text default:word default:word map: map: data : data : netid : netid : disable :[string] no disable :[string] no text1 :[string] default:text text1 :[string] default:text word1 :[string] default:word word1 :[string] default:word path == data.*: len(v): 1 path == data.*: len(v): 1 0 : map[disable:no text1:default:text word1:default:word] 0 : map[disable:no text1:default:text word1:default:word] disable : no disable : no text1 : default:text text1 : default:text word1 : default:word word1 : default:word path == data.*.*: len(v): 3 path == data.*.*: len(v): 3 0 : no 0 : no 1 : default:text 1 : default:text 2 : default:word 2 : default:word TestValuesFromTagPath2(), iteration: 1 TestValuesFromTagPath2(), iteration: 1 yes yes default:text default:text default:word default:word map: map: data : data : idnet : idnet : disable :[string] yes disable :[string] yes text1 :[string] default:text text1 :[string] default:text word1 :[string] default:word word1 :[string] default:word path == data.*: len(v): 1 path == data.*: len(v): 1 0 : map[disable:yes text1:default:text word1:default:word] 0 : map[disable:yes text1:default:text word1:default:word] disable : yes disable : yes text1 : default:text text1 : default:text word1 : default:word word1 : default:word path == data.*.*: len(v): 3 path == data.*.*: len(v): 3 0 : default:text 0 : default:text 1 : default:word 1 : default:word 2 : yes 2 : yes Unmarshal test ... *map[string]interface{}, *string Unmarshal test ... *map[string]interface{}, *string m: map[doc:map[name:Mayer Hawthorne song:map[title:A Long Time verse:map[-no:1 line:[map[#text:Henry was a renegade -no:1] map[#text:Didn't like to play it safe -no:2]]]]]] m: map[doc:map[name:Mayer Hawthorne song:map[title:A Long Time verse:map[-no:1 line:[map[#text:Henry was a renegade -no:1] map[#text:Didn't like to play it safe -no:2]]]]]] s: {"doc":{"name":"Mayer Hawthorne","song":{"title":"A Long Time","verse":{"-no":"1","line":[{"#text":"Henry was a renegade","-no":"1"},{"#text":"Didn't like to play it safe","-no":"2"}]}}}} s: {"doc":{"name":"Mayer Hawthorne","song":{"title":"A Long Time","verse":{"-no":"1","line":[{"#text":"Henry was a renegade","-no":"1"},{"#text":"Didn't like to play it safe","-no":"2"}]}}}} Unmarshal test ... struct: clbanning
unknown
Unmarshal test ... struct: clbanning
unknown
myInfo: {XMLName:{Space: Local:info} Name:clbanning Address:unknown} myInfo: {XMLName:{Space: Local:info} Name:clbanning Address:unknown} TestMapValue of doc.song.verse w/ len(attrs) == 0. TestMapValue of doc.song.verse w/ len(attrs) == 0. doc: Mayer Hawthorne A Long Time Henry was a renegade Didn't like to play it safe doc: Mayer Hawthorne A Long Time Henry was a renegade Didn't like to play it safe result: map[-no:1 line:[map[#text:Henry was a renegade -no:1] map[#text:Didn't like to play it safe -no:2]]] result: map[-no:1 line:[map[#text:Henry was a renegade -no:1] map[#text:Didn't like to play it safe -no:2]]] PASS PASS ok github.com/clbanning/x2j 0.059s ok github.com/clbanning/x2j 0.059s Processing files: golang-github-clbanning-x2j-devel-1.1-1.fc31.noarch Processing files: golang-github-clbanning-x2j-devel-1.1-1.fc31.noarch + exit 0 + exit 0 Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.wYGm3w Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.wYGm3w + umask 022 + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + cd x2j-1.1 + cd x2j-1.1 + DOCDIR=/builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64/usr/share/doc/golang-github-clbanning-x2j-devel + DOCDIR=/builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64/usr/share/doc/golang-github-clbanning-x2j-devel + export LC_ALL=C + export LC_ALL=C + LC_ALL=C + LC_ALL=C + export DOCDIR + export DOCDIR + /usr/bin/mkdir -p /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64/usr/share/doc/golang-github-clbanning-x2j-devel + /usr/bin/mkdir -p /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64/usr/share/doc/golang-github-clbanning-x2j-devel + cp -pr README /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64/usr/share/doc/golang-github-clbanning-x2j-devel + cp -pr README /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64/usr/share/doc/golang-github-clbanning-x2j-devel + cp -pr examples /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64/usr/share/doc/golang-github-clbanning-x2j-devel + cp -pr examples /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64/usr/share/doc/golang-github-clbanning-x2j-devel + exit 0 + exit 0 Executing(%license): /bin/sh -e /var/tmp/rpm-tmp.F1bjDv Executing(%license): /bin/sh -e /var/tmp/rpm-tmp.F1bjDv + umask 022 + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + cd x2j-1.1 + cd x2j-1.1 + LICENSEDIR=/builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64/usr/share/licenses/golang-github-clbanning-x2j-devel + LICENSEDIR=/builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64/usr/share/licenses/golang-github-clbanning-x2j-devel + export LC_ALL=C + export LC_ALL=C + LC_ALL=C + LC_ALL=C + export LICENSEDIR + export LICENSEDIR + /usr/bin/mkdir -p /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64/usr/share/licenses/golang-github-clbanning-x2j-devel + /usr/bin/mkdir -p /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64/usr/share/licenses/golang-github-clbanning-x2j-devel + cp -pr LICENSE /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64/usr/share/licenses/golang-github-clbanning-x2j-devel + cp -pr LICENSE /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64/usr/share/licenses/golang-github-clbanning-x2j-devel + exit 0 + exit 0 Provides: golang(github.com/clbanning/x2j) = 1.1-1.fc31 golang(github.com/clbanning/x2j)(tag=1.1) = 1.1-1.fc31 golang-github-clbanning-x2j-devel = 1.1-1.fc31 golang-ipath(github.com/clbanning/x2j) = 1.1-1.fc31 golang-ipath(github.com/clbanning/x2j)(tag=1.1) = 1.1-1.fc31 Provides: golang(github.com/clbanning/x2j) = 1.1-1.fc31 golang(github.com/clbanning/x2j)(tag=1.1) = 1.1-1.fc31 golang-github-clbanning-x2j-devel = 1.1-1.fc31 golang-ipath(github.com/clbanning/x2j) = 1.1-1.fc31 golang-ipath(github.com/clbanning/x2j)(tag=1.1) = 1.1-1.fc31 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires: go-filesystem Requires: go-filesystem Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64 Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64 Wrote: /builddir/build/RPMS/golang-github-clbanning-x2j-devel-1.1-1.fc31.noarch.rpm Wrote: /builddir/build/RPMS/golang-github-clbanning-x2j-devel-1.1-1.fc31.noarch.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.EKb7Iu Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.EKb7Iu + umask 022 + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + cd x2j-1.1 + cd x2j-1.1 + /usr/bin/rm -rf /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64 + /usr/bin/rm -rf /builddir/build/BUILDROOT/golang-github-clbanning-x2j-1.1-1.fc31.x86_64 + exit 0 + exit 0 Child return code was: 0 Child return code was: 0