mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-10-28 15:02:28 +00:00
Apply go fix to simplify using modern features
This patch contains the result of running `go fix ./...`, which applies simplifications that make use of modern language features. There are no logic or behaviour changes.
This commit is contained in:
@@ -56,8 +56,7 @@ func TestBadServer(t *testing.T) {
|
||||
if err == nil {
|
||||
t.Fatal("expected error")
|
||||
}
|
||||
var protoErr textproto.ProtocolError
|
||||
if !errors.As(err, &protoErr) {
|
||||
if _, ok := errors.AsType[textproto.ProtocolError](err); !ok {
|
||||
t.Errorf("wanted textproto.ProtocolError, got: %v (%T)", err, err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ func TestEndToEnd(t *testing.T) {
|
||||
|
||||
func waitForServer(t *testing.T, path string) {
|
||||
t.Helper()
|
||||
for i := 0; i < 100; i++ {
|
||||
for range 100 {
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
conn, err := net.Dial("unix", path)
|
||||
if conn != nil {
|
||||
|
||||
Reference in New Issue
Block a user