// InsensitiveLoad has exactly same functionality as Load function
// except it forces all section and key names to be lowercased.
544828
func InsensitiveLoad(source interface{}, others ...interface{}) (*File, error) {
	return LoadSources(LoadOptions{Insensitive: true}, source, others...)
}
859418
func Load(hexkey string) (Key, error) {
	if len(hexkey) != 64 {
		return nil, fmt.Errorf("nacl: incorrect hex key length: %d, should be 64", len(hexkey))
	}
	keyBytes, err := hex.DecodeString(hexkey)
	if err != nil {
		return nil, err
	}
	if len(keyBytes) != KeySize {
		return nil, fmt.Errorf("nacl: incorrect key length: %d", len(keyBytes))
	}
	key := new([KeySize]byte)
	copy(key[:], keyBytes)
	return key, nil
}
1079406
func (load S3LoadStrategy) Load(req *request.Request) (Envelope, error) {
	env := Envelope{}
	if load.InstructionFileSuffix == "" {
		load.InstructionFileSuffix = DefaultInstructionKeySuffix
	}

	input := req.Params.(*s3.GetObjectInput)
	out, err := load.Client.GetObject(&s3.GetObjectInput{
		Key:    aws.String(strings.Join([]string{*input.Key, load.InstructionFileSuffix}, "")),
		Bucket: input.Bucket,
	})
	if err != nil {
		return env, err
	}

	b, err := ioutil.ReadAll(out.Body)
	if err != nil {
		return env, err
	}
	err = json.Unmarshal(b, &env)
	return env, err
}
629281
func SVGUnload(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "SVGUnload", Listener: listener}
}
510298
func (l *MemoryLoader) Load(name string) (Template, error) {
	v, ok := l.Templates[name]
	if !ok {
		return nil, os.ErrNotExist
	}
	return &stringTemplate{name, v}, nil
}
1011665
func Load(filename, password string) (tls.Certificate, error) {
	p12, err := ioutil.ReadFile(filename)
	if err != nil {
		return tls.Certificate{}, fmt.Errorf("Unable to load %s: %v", filename, err)
	}
	return Decode(p12, password)
}
379453
func (e *EnvironmentLoader) Load(s interface{}) error {
	strct := structs.New(s)
	strctMap := strct.Map()
	prefix := e.getPrefix(strct)

	for key, val := range strctMap {
		field := strct.Field(key)

		if err := e.processField(prefix, field, key, val); err != nil {
			return err
		}
	}

	return nil
}
519404
func (c *SQLiteConn) LoadExtension(lib string, entry string) error {
	rv := C.sqlite3_enable_load_extension(c.db, 1)
	if rv != C.SQLITE_OK {
		return errors.New(C.GoString(C.sqlite3_errmsg(c.db)))
	}

	clib := C.CString(lib)
	defer C.free(unsafe.Pointer(clib))
	centry := C.CString(entry)
	defer C.free(unsafe.Pointer(centry))

	rv = C.sqlite3_load_extension(c.db, clib, centry, nil)
	if rv != C.SQLITE_OK {
		return errors.New(C.GoString(C.sqlite3_errmsg(c.db)))
	}

	rv = C.sqlite3_enable_load_extension(c.db, 0)
	if rv != C.SQLITE_OK {
		return errors.New(C.GoString(C.sqlite3_errmsg(c.db)))
	}

	return nil
}
1314344
func (c *Context) CacheLoad(name, path string, value interface{}) (ckey CacheKey, found bool) {
	ckey, data, found := c.CacheRead(name, path)
	if found {
		if err := gob.NewDecoder(bytes.NewBuffer(data)).Decode(value); err != nil {
			c.Criticalf("gob Decode: %v", err)
			found = false
		}
	}
	return
}
494256
func LoadSimple(path string) (d *Dic, err error) {
	r, err := zip.OpenReader(path)
	if err != nil {
		return d, err
	}
	defer r.Close()
	return load(&r.Reader, false)
}
293767
func (cli *Client) ImageLoad(ctx context.Context, input io.Reader, quiet bool) (types.ImageLoadResponse, error) {
	v := url.Values{}
	v.Set("quiet", "0")
	if quiet {
		v.Set("quiet", "1")
	}
	headers := map[string][]string{"Content-Type": {"application/x-tar"}}
	resp, err := cli.postRaw(ctx, "/images/load", v, input, headers)
	if err != nil {
		return types.ImageLoadResponse{}, err
	}
	return types.ImageLoadResponse{
		Body: resp.body,
		JSON: resp.header.Get("Content-Type") == "application/json",
	}, nil
}
927686
func (c *Client) ScriptLoad(script string) (string, error) {
	v, err := c.execOnFirst(true, "SCRIPT", "LOAD", script)
	if err != nil {
		return "", err
	}
	return iface2str(v)
}
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
}
647599
func (r *registry) loadTransitiveFileDependencies(file *File) error {
	seen := make(map[string]struct{})
	files, err := r.loadTransitiveFileDependenciesRecurse(file, seen)
	if err != nil {
		return err
	}
	file.TransitiveDependencies = files
	return nil
}
629068
func (c *ConfigFile) Reload() (err error) {
	var cfg *ConfigFile
	if len(c.fileNames) == 1 {
		cfg, err = LoadConfigFile(c.fileNames[0])
	} else {
		cfg, err = LoadConfigFile(c.fileNames[0], c.fileNames[1:]...)
	}

	if err == nil {
		*c = *cfg
	}
	return err
}
21472
func Load(set *FIFOSet) (IO, error) {
	return &cio{
		config:  set.Config,
		closers: []io.Closer{set},
	}, nil
}
1135525
func (t *TLSConfig) Load() (*tls.Config, error) {
	if t == nil {
		return nil, fmt.Errorf("nil TLS section in config")
	}
	if t.CertFile == nil {
		return nil, fmt.Errorf("nil CertFile in TLSConfig")
	}
	if t.KeyFile == nil {
		return nil, fmt.Errorf("nil KeyFile in TLSConfig")
	}
	if t.CACertFile == nil {
		return nil, fmt.Errorf("nil CACertFile in TLSConfig")
	}
	caCertBytes, err := ioutil.ReadFile(*t.CACertFile)
	if err != nil {
		return nil, fmt.Errorf("reading CA cert from %q: %s", *t.CACertFile, err)
	}
	rootCAs := x509.NewCertPool()
	if ok := rootCAs.AppendCertsFromPEM(caCertBytes); !ok {
		return nil, fmt.Errorf("parsing CA certs from %s failed", *t.CACertFile)
	}
	cert, err := tls.LoadX509KeyPair(*t.CertFile, *t.KeyFile)
	if err != nil {
		return nil, fmt.Errorf("loading key pair from %q and %q: %s",
			*t.CertFile, *t.KeyFile, err)
	}
	return &tls.Config{
		RootCAs:      rootCAs,
		ClientCAs:    rootCAs,
		ClientAuth:   tls.RequireAndVerifyClientCert,
		Certificates: []tls.Certificate{cert},
	}, nil
}