github.com/thajeztah/cli@v0.0.0-20240223162942-dc6bfac81a8b/cli-plugins/socket/socket_nodarwin.go (about)

     1  //go:build !darwin && !openbsd
     2  
     3  package socket
     4  
     5  import (
     6  	"net"
     7  )
     8  
     9  func listen(socketname string) (*net.UnixListener, error) {
    10  	return net.ListenUnix("unix", &net.UnixAddr{
    11  		Name: "@" + socketname,
    12  		Net:  "unix",
    13  	})
    14  }
    15  
    16  func onAccept(conn *net.UnixConn, listener *net.UnixListener) {
    17  	// do nothing
    18  	// while on darwin and OpenBSD we would unlink here;
    19  	// on non-darwin the socket is abstract and not present on the filesystem
    20  }