Code Review - My issues
---- PASS: TestNewMapXml6 (0.00s)
+--- PASS: TestNewMapXml6 (0.01s)
=== RUN TestXml3
------------ xml3_test.go
@@ -2421,7 +2457,7 @@
map[stream:stream:map[]]
--- PASS: TestXMPPStreamTagSeq (0.00s)
PASS
-ok github.com/clbanning/mxj/v2 0.025s
+ok github.com/clbanning/mxj/v2 0.166s
=== RUN TestJsonToXml_1
[{"some-null-value":"", "a-non-null-value":"bar"}]
xmloutput:
@@ -2431,13 +2467,13 @@
xmloutput: 1st2nd
--- PASS: TestJsonToXml_2 (0.00s)
PASS
-ok github.com/clbanning/mxj/v2/j2x 0.003s
+ok github.com/clbanning/mxj/v2/j2x 0.040s
=== 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:0xc0000104f8 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:0xc00012a4e0 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:0xc0000df170 goofyVal:0xc0000104f8 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:0xc00012d170 goofyVal:0xc00012a4e0 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
@@ -2524,13 +2560,14 @@
DocToMap(), recast==true:
msg :
- text :[string] help me!
song :
-title :[string] A Long Time
-author :[string] Mayer Hawthorne
verses :
verse :[[]interface{}]
[item: 0]
+ -name :[string] verse 1
+ -no :[float64] 1.00e+00
line :[[]interface{}]
[item: 0]
-no :[float64] 1.00e+00
@@ -2542,8 +2579,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
@@ -2556,8 +2593,6 @@
[item: 7]
-no :[float64] 8.00e+00
#text :[string] Booming like an atom bomb
- -name :[string] verse 1
- -no :[float64] 1.00e+00
[item: 1]
-name :[string] verse 2
-no :[float64] 2.00e+00
@@ -2580,8 +2615,8 @@
-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
+ -no :[float64] 2.00e+00
[item: 2]
-no :[float64] 3.00e+00
#text :[string] It's going to take a long time
@@ -2590,6 +2625,7 @@
#text :[string] It's going to take it, but we'll make it one day
-mtype :[string] alert
-mpriority :[float64] 1.00e+00
+ text :[string] help me!
DocToJsonIndent, recast==true:
{
@@ -3081,7 +3117,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
@@ -3127,11 +3163,11 @@
vv: [William H. Gaddis Austin Tappan Wright John Hawkes map[first_name:T.E. last_name:Porter]]
ValuesAtTagPath...doc2#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]]
+ss: [doc.books.author.books.book doc.books.author.book]
vv: [map[book:[map[title:The Beetle Leg] map[title:The Blood Oranges]]]]
+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,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]]
---- PASS: TestValuesAtTagPath (0.00s)
+--- PASS: TestValuesAtTagPath (0.01s)
=== RUN TestPathsForKey
================================ x2jfindPath_test.go
@@ -3203,15 +3239,15 @@
books :
book :[[]interface{}]
[item: 0]
- review :[string] One of the great seminal American novels of the 20th century.
-seq :[string] 1
author :[string] William H. Gaddis
title :[string] The Recognitions
+ review :[string] One of the great seminal American novels of the 20th century.
[item: 1]
- review :[string] An example of earlier 20th century American utopian fiction.
-seq :[string] 2
author :[string] Austin Tappan Wright
title :[string] Islandia
+ review :[string] An example of earlier 20th century American utopian fiction.
[item: 2]
-seq :[string] 3
author :[string] John Hawkes
@@ -3220,8 +3256,8 @@
[item: 3]
-seq :[string] 4
author :
- last_name :[string] Porter
first_name :[string] T.E.
+ last_name :[string] Porter
title :[string] King's Day
review :[string] A magical novella.
path == doc.books: len(v): 1
@@ -3239,22 +3275,22 @@
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]
path == doc.books.book.*: len(v): 12
-0 : One of the great seminal American novels of the 20th century.
-1 : William H. Gaddis
-2 : The Recognitions
+0 : William H. Gaddis
+1 : The Recognitions
+2 : One of the great seminal American novels of the 20th century.
3 : Austin Tappan Wright
4 : Islandia
5 : An example of earlier 20th century American utopian fiction.
-6 : A lyrical novel about the construction of Ft. Peck Dam in Montana.
-7 : John Hawkes
-8 : The Beetle Leg
+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 : One of the great seminal American novels of the 20th century.
+1 : William H. Gaddis
+2 : The Recognitions
path == doc.books.*.author: len(v): 4
0 : William H. Gaddis
1 : Austin Tappan Wright
@@ -3280,9 +3316,9 @@
6 : The Beetle Leg
7 : A lyrical novel about the construction of Ft. Peck Dam in Montana.
8 : John Hawkes
-9 : A magical novella.
-10 : map[first_name:T.E. last_name:Porter]
-11 : King's Day
+9 : map[first_name:T.E. last_name:Porter]
+10 : King's Day
+11 : A magical novella.
path == doc.*.*.*.*: len(v): 2
0 : T.E.
1 : Porter
@@ -3309,9 +3345,9 @@
path == data.*: len(v): 1
0 : map[disable:no text1:default:text word1:default:word]
- disable : no
text1 : default:text
word1 : default:word
+ disable : no
path == data.*.*: len(v): 3
0 : no
@@ -3365,7 +3401,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.009s
+ok github.com/clbanning/mxj/v2/x2j-wrapper 0.060s
create-stamp debian/debhelper-build-stamp
dh_testroot -O--builddirectory=_build -O--buildsystem=golang
dh_prep -O--builddirectory=_build -O--buildsystem=golang
@@ -3392,12 +3428,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/130599/tmp/hooks/B01_cleanup starting
+I: user script /srv/workspace/pbuilder/130599/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/1223966 and its subdirectories
-I: Current time: Wed Jun 18 23:29:27 -12 2025
-I: pbuilder-time-stamp: 1750332567
+I: removing directory /srv/workspace/pbuilder/130599 and its subdirectories
+I: Current time: Fri May 17 19:08:47 +14 2024
+I: pbuilder-time-stamp: 1715922527