func New(ops []Op) *Delta {
	return &Delta{
		Ops: ops,
	}
}
New creates a new Delta with the given ops
package delta
import (
	"encoding/json"
	"errors"
	"math"
	"reflect"
)
type Delta struct {
	Ops []Op `json:"ops"`
}
type Embed struct {
	Key   string
	Value interface{}
}
type Op struct {
	Insert      []rune                 `json:"insert,omitempty"`
	InsertEmbed *Embed                 `json:"-"`
	Retain      *int                   `json:"retain,omitempty"`
	Attributes  map[string]interface{} `json:"attributes,omitempty"`
	Delete      *int                   `json:"delete,omitempty"`
}
func (o *Op) IsNil() bool {
	return o.Attributes == nil &&
		o.Delete == nil &&
		o.Insert == nil &&
		o.Retain == nil
}
func (o *Op) Length() int {
	return OpsLength(*o)
}