Skip to content

Commit

Permalink
add pre go1.21 min helper
Browse files Browse the repository at this point in the history
  • Loading branch information
efd6 committed May 9, 2024
1 parent 8dca55e commit 84eba73
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions x-pack/filebeat/input/internal/httplog/roundtripper.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,13 @@ func logRequest(log *zap.Logger, req *http.Request, maxBodyLen int, extra ...zap
return req, reqParts[:0], errorsMessages
}

func min(a, b int) int {
if a < b {
return a
}
return b
}

// TxID returns the current transaction.id value. If rt is nil, the empty string is returned.
func (rt *LoggingRoundTripper) TxID() string {
if rt == nil {
Expand Down

0 comments on commit 84eba73

Please sign in to comment.