code: func ipcListen(endpoint string) (net.Listener, error) {
  	if len(endpoint) > int(C.max_socket_path_size()) {
  		log.Warn(fmt.Sprintf("The ipc endpoint is longer than %d characters. ", C.max_socket_path_size()),
  			"endpoint", endpoint)
  	}
  
  	// Ensure the IPC path exists and remove any previous leftover
  	if err := os.MkdirAll(filepath.Dir(endpoint), 0751); err != nil {
  		return nil, err
  	}
  	os.Remove(endpoint)
  	l, err := net.Listen("unix", endpoint)
  	if err != nil {
  		return nil, err
  	}
  	os.Chmod(endpoint, 0600)
  	return l, nil
  }
docs: // ipcListen will create a Unix socket on the given endpoint.