diff --git a/cmd/stun-client/stun_client.go b/cmd/stun-client/stun_client.go index bc635b0..79c0f75 100644 --- a/cmd/stun-client/stun_client.go +++ b/cmd/stun-client/stun_client.go @@ -27,7 +27,7 @@ func main() { uri, err := stun.ParseURI(uriStr) if err != nil { - log.Fatalf("invalid URI '%s': %s", uriStr, err) + log.Fatalf("Invalid URI '%s': %s", uriStr, err) } // we only try the first address, so restrict ourselves to IPv4 @@ -47,7 +47,7 @@ func main() { log.Print(xorAddr) }); err != nil { - log.Fatal("do:", err) + log.Fatal("Do:", err) } if err := c.Close(); err != nil { log.Fatalf("Failed to close connection: %s", err) diff --git a/cmd/stun-nat-behaviour/main.go b/cmd/stun-nat-behaviour/main.go index a25aa38..ba52e84 100644 --- a/cmd/stun-nat-behaviour/main.go +++ b/cmd/stun-nat-behaviour/main.go @@ -74,7 +74,7 @@ func main() { func mappingTests(addrStr string) error { mapTestConn, err := connect(addrStr) if err != nil { - log.Warnf("Error creating STUN connection: %s", err.Error()) + log.Warnf("Error creating STUN connection: %s", err) return err } @@ -147,7 +147,7 @@ func mappingTests(addrStr string) error { func filteringTests(addrStr string) error { mapTestConn, err := connect(addrStr) if err != nil { - log.Warnf("Error creating STUN connection: %s", err.Error()) + log.Warnf("Error creating STUN connection: %s", err) return err } @@ -254,10 +254,10 @@ func parse(msg *stun.Message) (ret struct { // Given an address string, returns a StunServerConn func connect(addrStr string) (*stunServerConn, error) { - log.Infof("connecting to STUN server: %s", addrStr) + log.Infof("Connecting to STUN server: %s", addrStr) addr, err := net.ResolveUDPAddr("udp4", addrStr) if err != nil { - log.Warnf("Error resolving address: %s", err.Error()) + log.Warnf("Error resolving address: %s", err) return nil, err } diff --git a/internal/testutil/allocs.go b/internal/testutil/allocs.go index f0c42f3..c43d8ba 100644 --- a/internal/testutil/allocs.go +++ b/internal/testutil/allocs.go @@ -15,6 +15,6 @@ func ShouldNotAllocate(t *testing.T, f func()) { return } if a := testing.AllocsPerRun(10, f); a > 0 { - t.Errorf("allocations detected: %f", a) + t.Errorf("Allocations detected: %f", a) } }