tailscale/net/ktimeout/ktimeout_test.go
Alex Chan c2e474e729 all: rename variables with lowercase-l/uppercase-I
See http://go/no-ell

Signed-off-by: Alex Chan <alexc@tailscale.com>

Updates #cleanup

Change-Id: I8c976b51ce7a60f06315048b1920516129cc1d5d
2025-11-18 09:12:34 +00:00

25 lines
390 B
Go

// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause
package ktimeout
import (
"context"
"fmt"
"net"
"time"
)
func ExampleUserTimeout() {
lc := net.ListenConfig{
Control: UserTimeout(30 * time.Second),
}
ln, err := lc.Listen(context.TODO(), "tcp", "127.0.0.1:0")
if err != nil {
fmt.Printf("error: %v", err)
return
}
ln.Close()
// Output:
}