// Load(i) returns the name and position of the i'th module directly
// loaded by this one, where 0 <= i < NumLoads().
// The name is unresolved---exactly as it appears in the source.
773644
func (prog *Program) Load(i int) (string, syntax.Position) {
	id := prog.compiled.Loads[i]
	return id.Name, id.Pos
}
73246
func (i *smallIndex) load() {
	it := i.db.NewIterator(util.BytesPrefix(i.prefix), nil)
	defer it.Release()
	for it.Next() {
		val := string(it.Value())
		id := binary.BigEndian.Uint32(it.Key()[len(i.prefix):])
		if val != "" {
			// Empty value means the entry has been deleted.
			i.id2val[id] = val
			i.val2id[val] = id
		}
		if id >= i.nextID {
			i.nextID = id + 1
		}
	}
}
171257
func (c *config) load() error {
	path, err := c.path()
	if err != nil {
		return nil
	}
	return c.loadFromPath(path)
}
490498
func Load(paths ...string) (err error) {
	if len(paths) == 0 {
		paths = append(paths, ".env")
	}
	for _, path := range paths {
		err = loadFile(path, false)
		if err != nil {
			return
		}
	}
	return
}
116403
func (e *Error) Load() error {
	v := e.v.Load()
	if v == nil {
		return nil
	}

	eh := v.(errorHolder)
	return eh.err
}
924327
func (cl *CacheLoader) Load(cache *Cache) error {
	return cl.reader.Read(func(entry wal.WALEntry) error {
		switch en := entry.(type) {
		case *wal.WriteWALEntry:
			return cache.WriteMulti(en.Values)

		case *wal.DeleteBucketRangeWALEntry:
			// TODO(edd): we need to clean up how we're encoding the prefix so that we
			// don't have to remember to get it right everywhere we need to touch TSM data.
			encoded := tsdb.EncodeName(en.OrgID, en.BucketID)
			name := models.EscapeMeasurement(encoded[:])

			cache.DeleteBucketRange(name, en.Min, en.Max)
			return nil
		}

		return nil
	})
}
682689
func (l *Loader) Load(ctx context.Context, to interface{}) error {
	select {
	case <-ctx.Done():
		return ctx.Err()
	default:
	}

	ref := reflect.ValueOf(to)

	if !ref.IsValid() || ref.Kind() != reflect.Ptr || ref.Elem().Kind() != reflect.Struct {
		return errors.New("provided target must be a pointer to struct")
	}

	ref = ref.Elem()

	s := l.parseStruct(&ref)
	s.S = to
	return l.resolve(ctx, s)
}
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
}
702175
func (m *nfsMounter) Load(source []string) error {
	info, err := mount.GetMounts()
	if err != nil {
		return err
	}
	re := regexp.MustCompile(`,addr=(.*)`)
MountLoop:
	for _, v := range info {
		host := "localhost"
		if len(m.servers) != 0 {
			if !strings.HasPrefix(v.Fstype, "nfs") {
				continue
			}
			matches := re.FindStringSubmatch(v.VfsOpts)
			if len(matches) != 2 {
				continue
			}

			if exists := m.serverExists(matches[1]); !exists {
				continue
			}
			host = matches[1]
		}
		m.normalizeSource(v, host)
		mount, ok := m.mounts[v.Source]
		if !ok {
			mount = &Info{
				Device:     v.Source,
				Fs:         v.Fstype,
				Minor:      v.Minor,
				Mountpoint: make([]*PathInfo, 0),
			}
			m.mounts[v.Source] = mount
		}
		// Allow Load to be called multiple times.
		for _, p := range mount.Mountpoint {
			if p.Path == v.Mountpoint {
				continue MountLoop
			}
		}
		mount.Mountpoint = append(mount.Mountpoint,
			&PathInfo{
				Path: normalizeMountPath(v.Mountpoint),
			},
		)
	}
	return nil
}
1120005
func (h *handler) Load(r *http.Request) (*Session, error) {
	s := New(h.name, h.keys)

	cookie, err := r.Cookie(h.name)
	if err != nil {
		// No session cookie found, we finish initializing a new one.
		s.Cookie.MaxAge = h.maxAge
		s.Cookie.Domain = h.domain
		s.Cookie.HttpOnly = true

		// When external stores are configured, we want to store the session ID in
		// the cookie to be able to store and retrieve its data.
		if h.store != nil {
			s.Value = genID(idSize)
		}
	} else {
		s.Cookie = cookie
	}

	if r.TLS != nil {
		s.Secure = true
	}

	data := []byte(s.Value)
	if h.store != nil {
		sessionID := s.Value
		data, err = h.store.Load(sessionID)
		if err != nil {
			return s, errors.Wrapf(err, "failed loading session ID: %s", sessionID)
		}
	}

	if err := s.Decode(data); err != nil {
		return s, err
	}

	return s, nil
}
438321
func (s *DjangoEngine) Load() error {

	if s.assetFn != nil && s.namesFn != nil {
		// embedded
		return s.loadAssets()
	}

	// load from directory, make the dir absolute here too.
	dir, err := filepath.Abs(s.directory)
	if err != nil {
		return err
	}
	// change the directory field configuration, load happens after directory has been setted, so we will not have any problems here.
	s.directory = dir
	return s.loadDirectory()
}
1061902
func (daemon *Daemon) load(id string) (*container.Container, error) {
	container := daemon.newBaseContainer(id)

	if err := container.FromDisk(); err != nil {
		return nil, err
	}
	if err := label.ReserveLabel(container.ProcessLabel); err != nil {
		return nil, err
	}

	if container.ID != id {
		return container, fmt.Errorf("Container %s is stored at %s", container.ID, id)
	}

	return container, nil
}
155897
func (m *Map) Load(key interface{}) (elem interface{}, found bool) {
	m.lock.RLock()
	elem, found = m.data[key]
	m.lock.RUnlock()
	return
}
1225080
func (d *database) Load(ctx context.Context, i interface{}) error {
	return ctxPool.GetSelect(ctx, d, d.e).Load(i)
}
1028452
func (m *deviceMounter) Load(devPrefixes []string) error {
	return m.load(devPrefixes, deviceFindMountPoint)
}
373041
func (m *MemDB) load(kvOffset int) (b []byte) {
	if kvOffset < 0 {
		return nil
	}
	bLen, n := binary.Uvarint(m.kvData[kvOffset:])
	i, j := kvOffset+n, kvOffset+n+int(bLen)
	return m.kvData[i:j:j]
}
1030330
func (f *Float64) Load() float64 {
	return math.Float64frombits(atomic.LoadUint64(&f.v))
}