aboutsummaryrefslogtreecommitdiff
path: root/prefork
diff options
context:
space:
mode:
authorGravatar Erik Dubbelboer <erik@dubbelboer.com> 2022-04-01 18:11:16 +0200
committerGravatar GitHub <noreply@github.com> 2022-04-01 18:11:16 +0200
commit7a5afddf5b805a022f8e81281c772c11600da2f4 (patch)
tree76ecbf4981921328d823eb925e57f874f52c34f2 /prefork
parentsupport adding/removing clients from LBClient (#1243) (diff)
downloadfasthttp-7a5afddf5b805a022f8e81281c772c11600da2f4.tar.gz
fasthttp-7a5afddf5b805a022f8e81281c772c11600da2f4.tar.bz2
fasthttp-7a5afddf5b805a022f8e81281c772c11600da2f4.zip
Use %v for errors and %q for strings (#1262)v1.35.0
Mostly in tests.
Diffstat (limited to 'prefork')
-rw-r--r--prefork/prefork_test.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/prefork/prefork_test.go b/prefork/prefork_test.go
index 19b2e47..9a9a873 100644
--- a/prefork/prefork_test.go
+++ b/prefork/prefork_test.go
@@ -48,7 +48,7 @@ func Test_New(t *testing.T) {
p := New(s)
if p.Network != defaultNetwork {
- t.Errorf("Prefork.Netork == %s, want %s", p.Network, defaultNetwork)
+ t.Errorf("Prefork.Netork == %q, want %q", p.Network, defaultNetwork)
}
if reflect.ValueOf(p.ServeFunc).Pointer() != reflect.ValueOf(s.Serve).Pointer() {
@@ -82,11 +82,11 @@ func Test_listen(t *testing.T) {
lnAddr := ln.Addr().String()
if lnAddr != addr {
- t.Errorf("Prefork.Addr == %s, want %s", lnAddr, addr)
+ t.Errorf("Prefork.Addr == %q, want %q", lnAddr, addr)
}
if p.Network != defaultNetwork {
- t.Errorf("Prefork.Network == %s, want %s", p.Network, defaultNetwork)
+ t.Errorf("Prefork.Network == %q, want %q", p.Network, defaultNetwork)
}
procs := runtime.GOMAXPROCS(0)
@@ -119,11 +119,11 @@ func Test_setTCPListenerFiles(t *testing.T) {
lnAddr := p.ln.Addr().String()
if lnAddr != addr {
- t.Errorf("Prefork.Addr == %s, want %s", lnAddr, addr)
+ t.Errorf("Prefork.Addr == %q, want %q", lnAddr, addr)
}
if p.Network != defaultNetwork {
- t.Errorf("Prefork.Network == %s, want %s", p.Network, defaultNetwork)
+ t.Errorf("Prefork.Network == %q, want %q", p.Network, defaultNetwork)
}
if len(p.files) != 1 {
@@ -155,7 +155,7 @@ func Test_ListenAndServe(t *testing.T) {
lnAddr := p.ln.Addr().String()
if lnAddr != addr {
- t.Errorf("Prefork.Addr == %s, want %s", lnAddr, addr)
+ t.Errorf("Prefork.Addr == %q, want %q", lnAddr, addr)
}
if p.ln == nil {
@@ -187,7 +187,7 @@ func Test_ListenAndServeTLS(t *testing.T) {
lnAddr := p.ln.Addr().String()
if lnAddr != addr {
- t.Errorf("Prefork.Addr == %s, want %s", lnAddr, addr)
+ t.Errorf("Prefork.Addr == %q, want %q", lnAddr, addr)
}
if p.ln == nil {
@@ -219,7 +219,7 @@ func Test_ListenAndServeTLSEmbed(t *testing.T) {
lnAddr := p.ln.Addr().String()
if lnAddr != addr {
- t.Errorf("Prefork.Addr == %s, want %s", lnAddr, addr)
+ t.Errorf("Prefork.Addr == %q, want %q", lnAddr, addr)
}
if p.ln == nil {