package server import ( "net" "os" "git.loafle.net/commons_go/server" ) func (sh *ServerHandlers) Listen(serverCTX server.ServerContext) (net.Listener, error) { os.Remove(sh.addr) l, err := net.ListenUnix("unix", &net.UnixAddr{Name: sh.addr, Net: "unix"}) if nil == err { os.Chmod(sh.addr, 0777) } return l, err }