func (r Response) NoData() Response {
	return r.NoStatus().NoBody()
}
NoData asserts that the input response has no status or body values.
package commands
import (
	"encoding/json"
	"errors"
	"fmt"
	"strings"
)
var (
	ErrStatusNotEmpty = errors.New("response status not empty")
	ErrBodyNotEmpty = errors.New("response body not empty")
)
const (
	deprecatedSuffix = "call is deprecated and will be removed in a future release"
	missingPrefix    = "No handler found"
	einval           = -22
)
type cephError interface {
	ErrorCode() int
}
type NotImplementedError struct {
	Response
}
func (e NotImplementedError) Error() string {
	return fmt.Sprintf("API call not implemented server-side: %s", e.status)
}
type Response struct {
	body   []byte
	status string
	err    error
}
func (r Response) Ok() bool {
	return r.err == nil
}
func (r Response) Error() string {
	if r.status == "" {
		return r.err.Error()
	}
	return fmt.Sprintf("%s: %q", r.err, r.status)
}
func (r Response) Unwrap() error {
	return r.err
}
func (r Response) Status() string {
	return r.status
}
func (r Response) Body() []byte {
	return r.body
}
func (r Response) End() error {
	if !r.Ok() {
		if ce, ok := r.err.(cephError); ok {
			if ce.ErrorCode() == einval && strings.HasPrefix(r.status, missingPrefix) {
				return NotImplementedError{Response: r}
			}
		}
		return r
	}
	return nil
}
func (r Response) NoStatus() Response {
	if !r.Ok() {
		return r
	}
	if r.status != "" {
		return Response{r.body, r.status, ErrStatusNotEmpty}
	}
	return r
}
func (r Response) NoBody() Response {
	if !r.Ok() {
		return r
	}
	if len(r.body) != 0 {
		return Response{r.body, r.status, ErrBodyNotEmpty}
	}
	return r
}
func (r Response) EmptyBody() Response {
	if !r.Ok() {
		return r
	}
	if len(r.body) != 0 {
		d := map[string]interface{}{}
		if err := json.Unmarshal(r.body, &d); err != nil {
			return Response{r.body, r.status, err}
		}
		if len(d) != 0 {
			return Response{r.body, r.status, ErrBodyNotEmpty}
		}
	}
	return r
}