code: func checkUnixSocketFileAndDirectory(endpoint string, forceRemoval bool) error {
  	if _, err := os.Stat(endpoint); err == nil && forceRemoval {
  		// Remove old socket file if required
  		return os.Remove(endpoint)
  	} else if os.IsNotExist(err) {
  		// Create the directory
  		return os.MkdirAll(path.Dir(endpoint), os.ModePerm)
  	}
  	return nil
  }
docs: // Check old socket file/directory of the unix domain socket. Remove old socket file if exists or create the directory
  // path if does not exist.