• 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

67.74
/header/proxy_authorization.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 ProxyAuthorization Authorization
15

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

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

20
func (hdr *ProxyAuthorization) 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((*Authorization)(hdr).renderValue(w))
6✔
28
}
29

30
func (hdr *ProxyAuthorization) 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 *ProxyAuthorization) 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
        _ = (*Authorization)(hdr).renderValue(sb)
2✔
47
        return sb.String()
2✔
48
}
49

50
func (hdr *ProxyAuthorization) Format(f fmt.State, verb rune) {
×
51
        switch verb {
×
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':
×
60
                fmt.Fprint(f, strconv.Quote(hdr.String()))
×
61
                return
×
62
        default:
×
63
                type hideMethods ProxyAuthorization
×
64
                type ProxyAuthorization hideMethods
×
UNCOV
65
                fmt.Fprintf(f, fmt.FormatString(f, verb), (*ProxyAuthorization)(hdr))
×
UNCOV
66
                return
×
67
        }
68
}
69

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

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

90
func (hdr *ProxyAuthorization) IsValid() bool { return (*Authorization)(hdr).IsValid() }
6✔
91

92
func buildFromProxyAuthorizationNode(node *abnf.Node) *ProxyAuthorization {
3✔
93
        return (*ProxyAuthorization)(buildFromAuthorizationNode(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