Code Review - My issues
---- PASS: TestNewMapXml6 (0.00s)
+--- PASS: TestNewMapXml6 (0.01s)
=== RUN TestXml3
------------ xml3_test.go
@@ -2416,7 +2452,7 @@
map[stream:stream:map[]]
--- PASS: TestXMPPStreamTagSeq (0.00s)
PASS
-ok github.com/clbanning/mxj/v2 0.036s
+ok github.com/clbanning/mxj/v2 0.088s
=== RUN TestJsonToXml_1
[{"some-null-value":"", "a-non-null-value":"bar"}]
xmloutput:
@@ -2426,13 +2462,13 @@
xmloutput: 1st2nd
--- PASS: TestJsonToXml_2 (0.00s)
PASS
-ok github.com/clbanning/mxj/v2/j2x 0.005s
+ok github.com/clbanning/mxj/v2/j2x 0.017s
=== RUN TestGoofy
-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:0xc0001224e0 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:0xc0000104f8 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"}}}
-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:0xc000125170 goofyVal:0xc0001224e0 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:0xc0000df170 goofyVal:0xc0000104f8 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"}}}
--- PASS: TestGoofy (0.00s)
=== RUN TestToMap
@@ -2519,24 +2555,9 @@
DocToMap(), recast==true:
msg :
- -mtype :[string] alert
-mpriority :[float64] 1.00e+00
text :[string] help me!
song :
- chorus :
- line :[[]interface{}]
- [item: 0]
- #text :[string] It's going to take a long time
- -no :[float64] 1.00e+00
- [item: 1]
- -no :[float64] 2.00e+00
- #text :[string] It's going to take it, but we'll make it one day
- [item: 2]
- -no :[float64] 3.00e+00
- #text :[string] It's going to take a long time
- [item: 3]
- -no :[float64] 4.00e+00
- #text :[string] It's going to take it, but we'll make it one day
-title :[string] A Long Time
-author :[string] Mayer Hawthorne
verses :
@@ -2546,8 +2567,8 @@
-no :[float64] 1.00e+00
line :[[]interface{}]
[item: 0]
- #text :[string] Henry was a renegade
-no :[float64] 1.00e+00
+ #text :[string] Henry was a renegade
[item: 1]
-no :[float64] 2.00e+00
#text :[string] Didn't like to play it safe
@@ -2555,8 +2576,8 @@
-no :[float64] 3.00e+00
#text :[string] One component at a time
[item: 3]
- #text :[string] There's got to be a better way
-no :[float64] 4.00e+00
+ #text :[string] There's got to be a better way
[item: 4]
-no :[float64] 5.00e+00
#text :[string] Oh, people came from miles around
@@ -2574,17 +2595,32 @@
-no :[float64] 2.00e+00
line :[[]interface{}]
[item: 0]
- #text :[string] Oh, Henry was the end of the story
-no :[float64] 1.00e+00
+ #text :[string] Oh, Henry was the end of the story
[item: 1]
-no :[float64] 2.00e+00
#text :[string] Then everything went wrong
[item: 2]
- #text :[string] And we'll return it to its former glory
-no :[float64] 3.00e+00
+ #text :[string] And we'll return it to its former glory
[item: 3]
-no :[float64] 4.00e+00
#text :[string] But it just takes so long
+ chorus :
+ line :[[]interface{}]
+ [item: 0]
+ -no :[float64] 1.00e+00
+ #text :[string] It's going to take a long time
+ [item: 1]
+ -no :[float64] 2.00e+00
+ #text :[string] It's going to take it, but we'll make it one day
+ [item: 2]
+ -no :[float64] 3.00e+00
+ #text :[string] It's going to take a long time
+ [item: 3]
+ -no :[float64] 4.00e+00
+ #text :[string] It's going to take it, but we'll make it one day
+ -mtype :[string] alert
DocToJsonIndent, recast==true:
{
@@ -2855,8 +2891,8 @@
val3
tag :
- #text :[string] val2
-item :[string] 1
+ #text :[string] val2
DocValue(): tag
{
@@ -3076,7 +3112,7 @@
-tag: parts :: len: 2 v: [map[part:[two.one two.two]] map[sections:map[section:[one two]]]]
+tag: parts :: len: 2 v: [map[sections:map[section:[one two]]] map[part:[two.one two.two]]]
no 'not_a_tag' tag
key: section :: len: 2 v: [[one map[parts:map[part:[two.one two.two]]]] [one two]]
no 'not_a_key' key
@@ -3203,15 +3239,15 @@
title :[string] The Recognitions
review :[string] One of the great seminal American novels of the 20th century.
[item: 1]
- -seq :[string] 2
author :[string] Austin Tappan Wright
title :[string] Islandia
review :[string] An example of earlier 20th century American utopian fiction.
+ -seq :[string] 2
[item: 2]
- -seq :[string] 3
- author :[string] John Hawkes
title :[string] The Beetle Leg
review :[string] A lyrical novel about the construction of Ft. Peck Dam in Montana.
+ -seq :[string] 3
+ author :[string] John Hawkes
[item: 3]
-seq :[string] 4
author :
@@ -3237,19 +3273,19 @@
0 : William H. Gaddis
1 : The Recognitions
2 : One of the great seminal American novels of the 20th century.
-3 : An example of earlier 20th century American utopian fiction.
-4 : Austin Tappan Wright
-5 : Islandia
-6 : The Beetle Leg
-7 : A lyrical novel about the construction of Ft. Peck Dam in Montana.
-8 : John Hawkes
+3 : Austin Tappan Wright
+4 : Islandia
+5 : An example of earlier 20th century American utopian fiction.
+6 : John Hawkes
+7 : The Beetle Leg
+8 : A lyrical novel about the construction of Ft. Peck Dam in Montana.
9 : map[first_name:T.E. last_name:Porter]
10 : King's Day
11 : A magical novella.
doc == doc2 / path == doc.books.book.*: len(v): 3
-0 : William H. Gaddis
-1 : The Recognitions
-2 : One of the great seminal American novels of the 20th century.
+0 : The Recognitions
+1 : One of the great seminal American novels of the 20th century.
+2 : William H. Gaddis
path == doc.books.*.author: len(v): 4
0 : William H. Gaddis
1 : Austin Tappan Wright
@@ -3272,15 +3308,15 @@
3 : Austin Tappan Wright
4 : Islandia
5 : An example of earlier 20th century American utopian fiction.
-6 : The Beetle Leg
-7 : A lyrical novel about the construction of Ft. Peck Dam in Montana.
-8 : John Hawkes
-9 : map[first_name:T.E. last_name:Porter]
-10 : King's Day
-11 : A magical novella.
+6 : John Hawkes
+7 : The Beetle Leg
+8 : A lyrical novel about the construction of Ft. Peck Dam in Montana.
+9 : King's Day
+10 : A magical novella.
+11 : map[first_name:T.E. last_name:Porter]
path == doc.*.*.*.*: len(v): 2
-0 : Porter
-1 : T.E.
+0 : T.E.
+1 : Porter
--- PASS: TestValuesFromTagPath (0.00s)
=== RUN TestValuesFromTagPath2
@@ -3304,14 +3340,14 @@
path == data.*: len(v): 1
0 : map[disable:no text1:default:text word1:default:word]
- word1 : default:word
disable : no
text1 : default:text
+ word1 : default:word
path == data.*.*: len(v): 3
-0 : no
-1 : default:text
-2 : default:word
+0 : default:text
+1 : default:word
+2 : no
TestValuesFromTagPath2(), iteration: 1
@@ -3360,7 +3396,7 @@
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: TestMapValue (0.00s)
PASS
-ok github.com/clbanning/mxj/v2/x2j-wrapper 0.015s
+ok github.com/clbanning/mxj/v2/x2j-wrapper 0.031s
create-stamp debian/debhelper-build-stamp
dh_testroot -O--builddirectory=_build -O--buildsystem=golang
dh_prep -O--builddirectory=_build -O--buildsystem=golang
@@ -3387,12 +3423,14 @@
dpkg-buildpackage: info: binary-only upload (no source included)
dpkg-genchanges: info: including full source code in upload
I: copying local configuration
+I: user script /srv/workspace/pbuilder/2849238/tmp/hooks/B01_cleanup starting
+I: user script /srv/workspace/pbuilder/2849238/tmp/hooks/B01_cleanup finished
I: unmounting dev/ptmx filesystem
I: unmounting dev/pts filesystem
I: unmounting dev/shm filesystem
I: unmounting proc filesystem
I: unmounting sys filesystem
I: cleaning the build env
-I: removing directory /srv/workspace/pbuilder/921180 and its subdirectories
-I: Current time: Thu Jun 6 06:38:04 -12 2024
-I: pbuilder-time-stamp: 1717699084
+I: removing directory /srv/workspace/pbuilder/2849238 and its subdirectories
+I: Current time: Thu Jul 10 15:03:00 +14 2025
+I: pbuilder-time-stamp: 1752109380