// Load implements ds.PropertyLoadSaver.
515879
func (lst *LogStreamState) Load(pmap ds.PropertyMap) error {
	// Discard derived properties.
	delete(pmap, "_Terminated")
	delete(pmap, ArchivalStateKey)

	return ds.GetPLS(lst).Load(pmap)
}
444761
func (c *Connection) Load(names ...string) (errors []error) {
	var tempErrors []error = make([]error, len(names))
	var numErrors int = 0
	for _, name := range names {
		err := c.Create(name)
		if err != nil {
			tempErrors = append(tempErrors, err)
			numErrors += 1
			continue
		}
		break
	}

	copy(errors, tempErrors[0:numErrors])
	return
}
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)
	}
}
1227146
func (sys *IAMSys) Load(objAPI ObjectLayer) error {
	if globalEtcdClient != nil {
		return sys.refreshEtcd()
	}
	return sys.refresh(objAPI)
}
434074
func (m *dirsMap) Load(key string) (bool, bool) {
	i, ok := m.data.Load(m.normalizeKey(key))
	if !ok {
		return false, false
	}
	s, ok := i.(bool)
	return s, ok
}
644592
func Load(data []byte) (*clientcmdapi.Config, error) {
	config := clientcmdapi.NewConfig()
	// if there's no data in a file, return the default object instead of failing (DecodeInto reject empty input)
	if len(data) == 0 {
		return config, nil
	}

	if err := clientcmdlatest.Codec.DecodeInto(data, config); err != nil {
		return nil, err
	}
	return config, nil
}
875081
func Load(filename string) (*Model, error) {
	f, err := os.Open(filename)
	if err != nil {
		return nil, err
	}
	defer f.Close()
	model, err := FromReader(f)
	if err != nil {
		model = new(Model)
		if err1 := model.convertOldFormat(filename); err1 != nil {
			return model, err1
		}
		return model, nil
	}
	return model, nil
}
583952
func Load(in io.Reader) (File, error) {
	file := make(File)
	err := file.Load(in)
	return file, err
}
1358887
func (c *ConfigFile) Load() error {
	rw, err := NewConfigReadWriter(c.version)
	if err != nil {
		return err
	}
	filename := rw.Filename(c)
	if _, err := os.Stat(filename); err != nil {
		return err
	}
	file, err := os.Open(filename)
	if err != nil {
		return err
	}
	err = rw.LoadFromReader(file, c)
	if err != nil {
		return err
	}
	defer file.Close()
	return nil
}
139699
func Load(file string) (Properties, error) {
	p := make(Properties)
	f, err := os.Open(file)
	if err != nil {
		return p, err
	}
	defer f.Close()
	if err := p.Load(f); err != nil {
		return p, err
	}
	return p, nil
}
614124
func (s Session) Load(data map[string]string) {
	for key, value := range data {
		if key == SessionObjectKeyName {
			target := map[string]string{}
			if err := json.Unmarshal([]byte(value), &target); err != nil {
				sessionLog.Error("Unable to unmarshal session ", "key", SessionObjectKeyName, "error", err)
			} else {
				s[key] = target
			}
		} else {
			s[key] = value
		}

	}
}
458477
func (s *DumbMemoryStore) load(session *sessions.Session) error {

	if err := securecookie.DecodeMulti(session.Name(), string(s.Data[session.ID]),
		&session.Values, s.Codecs...); err != nil {
		return err
	}
	return nil
}
1219859
func (c *baseCache) load(key interface{}, cb func(interface{}, *time.Duration, error) (interface{}, error), isWait bool) (interface{}, bool, error) {
	v, called, err := c.loadGroup.Do(key, func() (v interface{}, e error) {
		defer func() {
			if r := recover(); r != nil {
				e = fmt.Errorf("Loader panics: %v", r)
			}
		}()
		return cb(c.loaderExpireFunc(key))
	}, isWait)
	if err != nil {
		return nil, called, err
	}
	return v, called, nil
}
1109242
func Load(path string, data interface{}) error {
	file, err := os.Open(path)
	if err != nil {
		return err
	}
	defer file.Close()
	decoder := json.NewDecoder(file)
	return decoder.Decode(data)
}
270061
func (s *wrappedSnap) Load() (*raftpb.Snapshot, error) {
	snapshot, err := s.Snapshotter.Load()
	if err != nil {
		return nil, err
	}
	snapshot.Data, err = encryption.Decrypt(snapshot.Data, s.decrypter)
	if err != nil {
		return nil, err
	}

	return snapshot, nil
}
1048156
func Load(der []byte) (*Data, error) {
	var err error

	d := new(Data)
	d.Cert, err = x509.ParseCertificate(der)
	if err != nil {
		return nil, err
	}

	if err = d.setCertificateType(); err != nil {
		fmt.Println(err)
	}

	return d, nil
}
274302
func (m multiLoader) Load(s interface{}) error {
	for _, loader := range m {
		if err := loader.Load(s); err != nil {
			return err
		}
	}

	return nil
}