code: func IsNotExist(err error) bool {
  	// If it's a bone-fide ENOENT just bail.
  	if os.IsNotExist(errors.Cause(err)) {
  		return true
  	}
  
  	// Check that it's not actually an ENOTDIR, which in some cases is a more
  	// convoluted case of ENOENT (usually involving weird paths).
  	var errno error
  	switch err := errors.Cause(err).(type) {
  	case *os.PathError:
  		errno = err.Err
  	case *os.LinkError:
  		errno = err.Err
  	case *os.SyscallError:
  		errno = err.Err
  	}
  	return errno == syscall.ENOTDIR || errno == syscall.ENOENT
  }
docs: // IsNotExist tells you if err is an error that implies that either the path
  // accessed does not exist (or path components don't exist). This is
  // effectively a more broad version of os.IsNotExist.