code: func (z *zookeeperKV) createFullPath(key string, ephemeral bool) error {
  	key = z.domain + normalize(key)
  	path := strings.Split(strings.TrimPrefix(key, "/"), "/")
  
  	for i := 1; i <= len(path); i++ {
  		newPath := "/" + strings.Join(path[:i], "/")
  
  		if i == len(path) {
  			flags := int32(0)
  			if ephemeral {
  				flags = zk.FlagEphemeral
  			}
  			_, err := z.client.Create(newPath, []byte{},
  				flags, zk.WorldACL(zk.PermAll))
  			return err
  		}
  
  		_, err := z.client.Create(newPath, []byte{},
  			0, zk.WorldACL(zk.PermAll))
  		if err != nil && err != zk.ErrNodeExists {
  			return err
  		}
  	}
  	return nil
  }
docs: // createFullPath creates the entire path for a directory