@@ -45,7 +45,7 @@ func main() {
4545 for scanner .Scan () {
4646 show := false
4747 var qt time.Time
48- var dur , len time.Duration
48+ var dur , length time.Duration
4949 var status , path , query , trace string
5050 var err error
5151
@@ -99,13 +99,13 @@ func main() {
9999 fmt .Println (err , line )
100100 continue
101101 }
102- len = et .Sub (st )
102+ length = et .Sub (st )
103103 } else {
104104 // Loki queries are nanosecond, simple check to see if it's a second or nanosecond timestamp
105105 if st > 9999999999 {
106- len = time .Unix (0 , et ).Sub (time .Unix (0 , st ))
106+ length = time .Unix (0 , et ).Sub (time .Unix (0 , st ))
107107 } else {
108- len = time .Unix (et , 0 ).Sub (time .Unix (st , 0 ))
108+ length = time .Unix (et , 0 ).Sub (time .Unix (st , 0 ))
109109 }
110110
111111 }
@@ -132,9 +132,9 @@ func main() {
132132 ts = fmt .Sprint (qt .Local ())
133133 }
134134 if * showQuery {
135- fmt .Fprintf (w , "%v\t %v\t %v\t %v\t %v\t %v\t %v\n " , ts , trace , len , dur , status , path , query )
135+ fmt .Fprintf (w , "%v\t %v\t %v\t %v\t %v\t %v\t %v\n " , ts , trace , length , dur , status , path , query )
136136 } else {
137- fmt .Fprintf (w , "%v\t %v\t %v\t %v\t %v\t %v\n " , ts , trace , len , dur , status , path )
137+ fmt .Fprintf (w , "%v\t %v\t %v\t %v\t %v\t %v\n " , ts , trace , length , dur , status , path )
138138 }
139139 //If looking at stdin, flush after every line as someone would only paste one line at a time at the terminal
140140 if ! isPipe {
0 commit comments