| 123456789101112131415161718192021 |
- package main
- import (
- "fmt"
- "net"
- "os"
- "time"
- )
- func main() {
- if len(os.Args) != 2 {
- fmt.Fprintln(os.Stderr, "usage: udsconnect <path>")
- os.Exit(2)
- }
- c, err := net.DialTimeout("unix", os.Args[1], 500*time.Millisecond)
- if err != nil {
- fmt.Fprintln(os.Stderr, err)
- os.Exit(1)
- }
- _ = c.Close()
- }
|