func (pi *PromisedID) Value() (int, error) {
	if *pi == -1 {
		return -1, errors.New("value has not been computed yet")
	}
	return (int)(*pi), nil
}
Value returns the ID that was computed when CommandList.End was
called. Returns an error if CommandList.End has not yet been called.
package mpd
import (
	"container/list"
	"errors"
	"fmt"
	"strconv"
)
type cmdType uint
const (
	cmdNoReturn cmdType = iota
	cmdAttrReturn
	cmdIDReturn
)
type command struct {
	cmd     string
	promise interface{}
	typeOf  cmdType
}
type CommandList struct {
	client *Client
	cmdQ   *list.List
}
type PromisedAttrs struct {
	attrs    Attrs
	computed bool
}
func newPromisedAttrs() *PromisedAttrs {
	return &PromisedAttrs{attrs: make(Attrs), computed: false}
}
type PromisedID int
func (pa *PromisedAttrs) Value() (Attrs, error) {
	if !pa.computed {
		return nil, errors.New("value has not been computed yet")
	}
	return pa.attrs, nil
}