push
github
35 of 42 new or added lines in 6 files covered. (83.33%)
179 existing lines in 21 files now uncovered.7088 of 11604 relevant lines covered (61.08%)
0.69 hits per line
| 1 |
// Copyright © 2023 Ory Corp
|
|
| 2 |
// SPDX-License-Identifier: Apache-2.0
|
|
| 3 |
|
|
| 4 |
package httpx
|
|
| 5 |
|
|
| 6 |
import (
|
|
| 7 |
"net/http"
|
|
| 8 |
) |
|
| 9 |
|
|
|
UNCOV
10
|
func GetResponseMeta(w http.ResponseWriter) (status, size int) { |
× |
|
UNCOV
11
|
switch t := w.(type) { |
× |
|
UNCOV
12
|
case interface{ Status() int }: |
× |
|
UNCOV
13
|
status = t.Status() |
× |
| 14 |
} |
|
| 15 |
|
|
|
UNCOV
16
|
switch t := w.(type) { |
× |
|
UNCOV
17
|
case interface{ Size() int }: |
× |
|
UNCOV
18
|
size = t.Size() |
× |
| 19 |
case interface{ Written() int64 }: |
× |
| 20 |
size = int(t.Written())
|
× |
| 21 |
} |
|
| 22 |
|
|
|
UNCOV
23
|
return
|
× |
| 24 |
} |