MCPcopy Create free account
hub / github.com/cli/cli / normalizeVerboseLog

Function normalizeVerboseLog

api/http_client_test.go:720–727  ·  view source on GitHub ↗
(t string)

Source from the content-addressed store, hash-verified

718var timezoneRE = regexp.MustCompile(`(?m)^> Time-Zone: .+`)
719
720func normalizeVerboseLog(t string) string {
721 t = requestAtRE.ReplaceAllString(t, "* Request at <time>")
722 t = hostWithPortRE.ReplaceAllString(t, "<host>:<port>")
723 t = dateRE.ReplaceAllString(t, "< Date: <time>")
724 t = durationRE.ReplaceAllString(t, "* Request took <duration>")
725 t = timezoneRE.ReplaceAllString(t, "> Time-Zone: <timezone>")
726 return t
727}
728
729func TestNewCachedHTTPClientWithStatuses(t *testing.T) {
730 tests := []struct {

Callers 2

TestNewHTTPClientFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected