func newBytesItem(data []byte) *bytesItem {
	return &bytesItem{data}
}
The newBytesItem function creates and returns a config item from the given bytes.
package configurator
import (
	"bytes"
	"encoding/json"
	"encoding/xml"
	"io"
	"io/ioutil"
	"path/filepath"
	"strings"
	"github.com/BurntSushi/toml"
	"gopkg.in/yaml.v2"
)
type Item interface {
	IsEmpty() bool
	Len() int
	Bytes() []byte
	String() string
	Reader() io.Reader
	JSON(interface{}) error
	XML(interface{}) error
	TOML(interface{}) error
	YAML(interface{}) error
}
func NewItemFromBytes(data []byte) Item {
	return newBytesItem(data)
}
func NewItemFromString(s string) Item {
	return newBytesItem([]byte(s))
}
func NewItemFromReader(r io.Reader) (Item, error) {
	data, err := ioutil.ReadAll(r)
	if err != nil {
		return nil, err
	}
	return newBytesItem(data), nil
}