• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ghettovoice / gosip / 18541436410

15 Oct 2025 08:14PM UTC coverage: 38.19% (+0.2%) from 37.954%
18541436410

push

github

ghettovoice
Use render options in send request/response methods

8 of 8 new or added lines in 1 file covered. (100.0%)

583 existing lines in 48 files now uncovered.

5347 of 14001 relevant lines covered (38.19%)

5.24 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

79.03
/header/proxy_authenticate.go
1
package header
2

3
import (
4
        "fmt"
5
        "io"
6
        "strconv"
7

8
        "braces.dev/errtrace"
9
        "github.com/ghettovoice/abnf"
10

11
        "github.com/ghettovoice/gosip/internal/stringutil"
12
)
13

14
type ProxyAuthenticate WWWAuthenticate
15

16
func (*ProxyAuthenticate) CanonicName() Name { return "Proxy-Authenticate" }
6✔
17

UNCOV
18
func (*ProxyAuthenticate) CompactName() Name { return "Proxy-Authenticate" }
×
19

20
func (hdr *ProxyAuthenticate) RenderTo(w io.Writer, _ ...any) error {
7✔
21
        if hdr == nil {
8✔
22
                return nil
1✔
23
        }
1✔
24
        if _, err := fmt.Fprint(w, hdr.CanonicName(), ": "); err != nil {
6✔
UNCOV
25
                return errtrace.Wrap(err)
×
UNCOV
26
        }
×
27
        return errtrace.Wrap((*WWWAuthenticate)(hdr).renderValue(w))
6✔
28
}
29

30
func (hdr *ProxyAuthenticate) Render(opts ...any) string {
5✔
31
        if hdr == nil {
6✔
32
                return ""
1✔
33
        }
1✔
34
        sb := stringutil.GetStringBuilder()
4✔
35
        defer stringutil.FreeStringBuilder(sb)
4✔
36
        _ = hdr.RenderTo(sb, opts...)
4✔
37
        return sb.String()
4✔
38
}
39

40
func (hdr *ProxyAuthenticate) String() string {
3✔
41
        if hdr == nil {
4✔
42
                return ""
1✔
43
        }
1✔
44
        sb := stringutil.GetStringBuilder()
2✔
45
        defer stringutil.FreeStringBuilder(sb)
2✔
46
        _ = (*WWWAuthenticate)(hdr).renderValue(sb)
2✔
47
        return sb.String()
2✔
48
}
49

50
func (hdr *ProxyAuthenticate) Format(f fmt.State, verb rune) {
3✔
51
        switch verb {
3✔
52
        case 's':
×
53
                if f.Flag('+') {
×
54
                        _ = hdr.RenderTo(f)
×
55
                        return
×
56
                }
×
57
                fmt.Fprint(f, hdr.String())
×
58
                return
×
59
        case 'q':
×
UNCOV
60
                fmt.Fprint(f, strconv.Quote(hdr.String()))
×
UNCOV
61
                return
×
62
        default:
3✔
63
                type hideMethods ProxyAuthenticate
3✔
64
                type ProxyAuthenticate hideMethods
3✔
65
                fmt.Fprintf(f, fmt.FormatString(f, verb), (*ProxyAuthenticate)(hdr))
3✔
66
                return
3✔
67
        }
68
}
69

70
func (hdr *ProxyAuthenticate) Clone() Header {
6✔
71
        if hdr == nil {
7✔
72
                return nil
1✔
73
        }
1✔
74
        return (*ProxyAuthenticate)((*WWWAuthenticate)(hdr).Clone().(*WWWAuthenticate)) //nolint:forcetypeassert
5✔
75
}
76

77
func (hdr *ProxyAuthenticate) Equal(val any) bool {
23✔
78
        var other *ProxyAuthenticate
23✔
79
        switch v := val.(type) {
23✔
80
        case ProxyAuthenticate:
1✔
81
                other = &v
1✔
82
        case *ProxyAuthenticate:
21✔
83
                other = v
21✔
84
        default:
1✔
85
                return false
1✔
86
        }
87
        return (*WWWAuthenticate)(hdr).Equal((*WWWAuthenticate)(other))
22✔
88
}
89

90
func (hdr *ProxyAuthenticate) IsValid() bool { return (*WWWAuthenticate)(hdr).IsValid() }
6✔
91

92
func buildFromProxyAuthenticateNode(node *abnf.Node) *ProxyAuthenticate {
3✔
93
        return (*ProxyAuthenticate)(buildFromWWWAuthenticateNode(node))
3✔
94
}
3✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc