File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 9
9
10
10
xml_file=" $1 "
11
11
12
- parsed=$( ./jtlparse -o xml " $xml_file " | xmllint --c14n --pretty 1 -)
12
+ parsed=$( ./jtl-parse -o xml " $xml_file " | xmllint --c14n --pretty 1 -)
13
13
original=$( xmllint --c14n --pretty 1 " $xml_file " )
14
14
15
15
# diff and ignore white space
16
- diff -w <( echo ${original} ) <( echo ${parsed} )
16
+ cmp -b <( echo ${original} ) <( echo ${parsed} )
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ package jtl
3
3
import (
4
4
"encoding/xml"
5
5
"fmt"
6
- "log"
7
6
"os"
8
7
)
9
8
@@ -24,6 +23,7 @@ func Decode(filename string, output chan<- interface{}) {
24
23
if token == nil {
25
24
break
26
25
}
26
+
27
27
// Inspect the type of the token just read.
28
28
switch elementType := token .(type ) {
29
29
case xml.StartElement :
@@ -37,7 +37,7 @@ func Decode(filename string, output chan<- interface{}) {
37
37
var sample Sample
38
38
err := decoder .DecodeElement (& sample , & elementType )
39
39
if err != nil {
40
- log .Println ("Could not decode element" , err )
40
+ fmt .Println ("Could not decode element" , err )
41
41
// log this, but just skip
42
42
break
43
43
}
@@ -48,7 +48,7 @@ func Decode(filename string, output chan<- interface{}) {
48
48
var sample HttpSample
49
49
err := decoder .DecodeElement (& sample , & elementType )
50
50
if err != nil {
51
- log .Println ("Could not decode element" , err )
51
+ fmt .Println ("Could not decode element" , err )
52
52
// log this, but just skip
53
53
break
54
54
}
You can’t perform that action at this time.
0 commit comments