// Load creates a Tree from a string.
333338
func Load(content string) (tree *Tree, err error) {
	return LoadBytes([]byte(content))
}
798936
func (l *List) LoadString(src string, options *ParserOption) ([]Rule, error) {
	r := strings.NewReader(src)
	return l.parse(r, options)
}
334795
func (ms *MatStack) Load(m mgl64.Mat4) {
	(*ms)[len(*ms)-1] = m
}
38584
func Load() *Config {
	for _, l := range configLocations() {
		if debug {
			fmt.Printf("[DEBUG] Trying to load config from %s\n", l)
		}
		cfg, err := load(l)
		if err == ErrConfigNotFound {
			continue
		}
		if err != nil {
			panic(err)
		}
		_ = cfg.checkDefaults()
		if debug {
			fmt.Printf("[DEBUG] Loaded config from %s: %+v\n", l, cfg)
		}
		return cfg
	}
	cfg := New()
	cfg.Root.Path = backend.FromPath(PwStoreDir(""))
	_ = cfg.checkDefaults()
	if debug {
		fmt.Printf("[DEBUG] config.Load(): %+v\n", cfg)
	}
	return cfg
}
622434
func LoadReader(reader io.Reader) (tree *Tree, err error) {
	inputBytes, err := ioutil.ReadAll(reader)
	if err != nil {
		return
	}
	tree, err = LoadBytes(inputBytes)
	return
}
1191776
func (l *jsonLoader) Load(out interface{}) error {
	var buf bytes.Buffer
	buf.ReadFrom(l.r)
	if err := json.Unmarshal(buf.Bytes(), out); err != nil {
		return err
	}
	return nil
}
1227146
func (sys *IAMSys) Load(objAPI ObjectLayer) error {
	if globalEtcdClient != nil {
		return sys.refreshEtcd()
	}
	return sys.refresh(objAPI)
}
1116217
func (formats *Formats) Load(urls ...string) error {
	for _, url := range urls {
		err := formats.load(url)
		if err != nil {
			return err
		}
	}
	return nil
}
244047
func (a Aggregations) load(i map[string]interface{}) error {
	for k, value := range i {
		valueMap, ok := value.(map[string]interface{})
		if ok {
			agg := &Aggregate{Name: k}
			e := agg.Load(valueMap)
			if e != nil {
				return e
			}
			a[k] = agg
		}
	}
	return nil
}
225882
func (e *Env) Load(m map[string]string) {
	if len(m) == 0 {
		return
	}
	if e.env == nil {
		e.env = make(map[string]string, len(m))
	}
	for k, v := range m {
		e.Set(k, v)
	}
}
1030330
func (f *Float64) Load() float64 {
	return math.Float64frombits(atomic.LoadUint64(&f.v))
}
789116
func (l *StringLoader) Load(name string) (Template, error) {
	return &stringTemplate{name, name}, nil
}
1072248
func (l *tomlLoader) Load(out interface{}) error {
	if _, err := toml.DecodeReader(l.r, out); err != nil {
		return err
	}
	return nil
}
647824
func (loader *TemplateLoader) Load(fs filesystem.Filespace, subPath string) error {
	bytes, err := fs.ReadFile(subPath)
	if err != nil {
		return err
	}
	loader.muTemplate.Lock()
	defer loader.muTemplate.Unlock()
	if len(bytes) == 0 {
		return fmt.Errorf("empty file")
	}
	if _, err := loader.template.Parse(string(bytes)); err != nil {
		return fmt.Errorf("%v: %v", subPath, err)
	}
	return nil
}
581531
func Load(v interface{}, s ...Source) error {
	if reflect.Indirect(reflect.ValueOf(v)).Kind() != reflect.Struct {
		panic("scan for non-struct type")
	}
	if len(s) == 0 {
		return nil
	}
	scn := &scanner{s}
	return scn.scan(v)
}
1166995
func (ed *EtcdDriver) Load(configStorePath string) int {
	var err error
	ed.path = configStorePath
	ed.response, err = ed.client.Get(configStorePath, true, true)
	if err != nil {
		if etcderr, ok := err.(*etcd.EtcdError); ok {
			return etcderr.ErrorCode
		} else {
			panic(fmt.Sprintf("Error retrieving data from etcd:  %s", err.Error()))
		}
	}
	return gostrufig.CONFIGFOUND
}
828276
func (t *TOMLLoader) Load(s interface{}) error {
	var r io.Reader

	if t.Reader != nil {
		r = t.Reader
	} else if t.Path != "" {
		file, err := getConfig(t.Path)
		if err != nil {
			return err
		}
		defer file.Close()
		r = file
	} else {
		return ErrSourceNotSet
	}

	if _, err := toml.DecodeReader(r, s); err != nil {
		return err
	}

	return nil
}