func (b *Box) AddString(path string, t string) error {
	return b.AddBytes(path, []byte(t))
}
AddString converts t to a byteslice and delegates to AddBytes to add to b.data
package packr
import (
	"bytes"
	"fmt"
	"io"
	"io/ioutil"
	"net/http"
	"os"
	"path"
	"path/filepath"
	"sort"
	"strings"
	"github.com/gobuffalo/packd"
	"github.com/gobuffalo/packr/v2/file"
	"github.com/gobuffalo/packr/v2/file/resolver"
	"github.com/gobuffalo/packr/v2/plog"
	"github.com/markbates/oncer"
)
var _ packd.Box = &Box{}
var _ packd.HTTPBox = &Box{}
var _ packd.Addable = &Box{}
var _ packd.Walkable = &Box{}
var _ packd.Finder = &Box{}
type Box struct {
	Path            string            `json:"path"`
	Name            string            `json:"name"`
	ResolutionDir   string            `json:"resolution_dir"`
	DefaultResolver resolver.Resolver `json:"default_resolver"`
	resolvers       resolversMap
	dirs            dirsMap
}
func NewBox(path string) *Box {
	oncer.Deprecate(0, "packr.NewBox", "Use packr.New instead.")
	return New(path, path)
}
func New(name string, path string) *Box {
	plog.Debug("packr", "New", "name", name, "path", path)
	b, _ := findBox(name)
	if b != nil {
		return b
	}
	b = construct(name, path)
	plog.Debug(b, "New", "Box", b, "ResolutionDir", b.ResolutionDir)
	b, err := placeBox(b)
	if err != nil {
		panic(err)
	}
	return b
}
func Folder(path string) *Box {
	return New(path, path)
}
func (b *Box) SetResolver(file string, res resolver.Resolver) {
	d := filepath.Dir(file)
	b.dirs.Store(d, true)
	plog.Debug(b, "SetResolver", "file", file, "resolver", fmt.Sprintf("%T", res))
	b.resolvers.Store(resolver.Key(file), res)
}