Skip to content

Commit a64e1d4

Browse files
committed
Fix formatting
1 parent c73910e commit a64e1d4

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

internal/ingress/metric/collectors/socket.go

+13-13
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,16 @@ var requestTags = []string{
100100
}
101101

102102
var validHTTPMethods = []string{
103-
// Unless otherwise noted, these are defined in RFC 7231 section 4.3.
104-
"GET",
105-
"HEAD",
106-
"POST",
107-
"PUT",
108-
"PATCH", // RFC 5789
109-
"DELETE",
110-
"CONNECT",
111-
"OPTIONS",
112-
"TRACE",
103+
// Unless otherwise noted, these are defined in RFC 7231 section 4.3.
104+
"GET",
105+
"HEAD",
106+
"POST",
107+
"PUT",
108+
"PATCH", // RFC 5789
109+
"DELETE",
110+
"CONNECT",
111+
"OPTIONS",
112+
"TRACE",
113113
}
114114

115115
// NewSocketCollector creates a new SocketCollector instance using
@@ -330,9 +330,9 @@ func (sc *SocketCollector) handleMessage(msg []byte) {
330330
if sc.reportStatusClasses && stats.Status != "" {
331331
stats.Status = fmt.Sprintf("%cxx", stats.Status[0])
332332
}
333-
if !slices.Contains(validHTTPMethods, stats.Method) {
334-
stats.Method = "invalid_method"
335-
}
333+
if !slices.Contains(validHTTPMethods, stats.Method) {
334+
stats.Method = "invalid_method"
335+
}
336336

337337
// Note these must match the order in requestTags at the top
338338
requestLabels := prometheus.Labels{

0 commit comments

Comments
 (0)