@@ -117,34 +117,28 @@ func udpInputAttributesTest(input []byte, expected []string, stable bool) func(t
117117
118118 if addr , ok := udpInput .connection .LocalAddr ().(* net.UDPAddr ); ok {
119119 expectedAttributes ["network.local.address" ] = addr .IP .String ()
120- expectedAttributes ["network.local.port" ] =
121- strconv .FormatInt (int64 (addr .Port ), 10 )
120+ expectedAttributes ["network.local.port" ] = strconv .FormatInt (int64 (addr .Port ), 10 )
122121 }
123122
124123 if addr , ok := conn .LocalAddr ().(* net.UDPAddr ); ok {
125124 expectedAttributes ["network.peer.address" ] = addr .IP .String ()
126- expectedAttributes ["network.peer.port" ] =
127- strconv .FormatInt (int64 (addr .Port ), 10 )
125+ expectedAttributes ["network.peer.port" ] = strconv .FormatInt (int64 (addr .Port ), 10 )
128126 }
129127 } else {
130128 expectedAttributes ["net.transport" ] = "IP.UDP"
131129
132130 if addr , ok := udpInput .connection .LocalAddr ().(* net.UDPAddr ); ok {
133131 ip := addr .IP .String ()
134132 expectedAttributes ["net.host.ip" ] = ip
135- expectedAttributes ["net.host.port" ] =
136- strconv .FormatInt (int64 (addr .Port ), 10 )
137- expectedAttributes ["net.host.name" ] =
138- udpInput .resolver .GetHostFromIP (ip )
133+ expectedAttributes ["net.host.port" ] = strconv .FormatInt (int64 (addr .Port ), 10 )
134+ expectedAttributes ["net.host.name" ] = udpInput .resolver .GetHostFromIP (ip )
139135 }
140136
141137 if addr , ok := conn .LocalAddr ().(* net.UDPAddr ); ok {
142138 ip := addr .IP .String ()
143139 expectedAttributes ["net.peer.ip" ] = ip
144- expectedAttributes ["net.peer.port" ] =
145- strconv .FormatInt (int64 (addr .Port ), 10 )
146- expectedAttributes ["net.peer.name" ] =
147- udpInput .resolver .GetHostFromIP (ip )
140+ expectedAttributes ["net.peer.port" ] = strconv .FormatInt (int64 (addr .Port ), 10 )
141+ expectedAttributes ["net.peer.name" ] = udpInput .resolver .GetHostFromIP (ip )
148142 }
149143 }
150144 require .Equal (t , expectedBody , entry .Body )
0 commit comments