// Load imports sql queries from any io.Reader.
177667
func Load(r io.Reader) (*DotSql, error) {
	scanner := &Scanner{}
	queries := scanner.Run(bufio.NewScanner(r))

	dotsql := &DotSql{
		queries: queries,
	}

	return dotsql, nil
}
549929
func Load(qw graph.QuadWriter, batch int, path, typ string) error {
	return DecompressAndLoad(qw, batch, path, typ, nil)
}
1155816
func (cfg *Config) Load(filepath string) {
	file, err := ioutil.ReadFile(filepath)
	if err != nil {
		LOGHANDLER.Fatal(err)
	}

	err = json.Unmarshal(file, cfg)
	if err != nil {
		LOGHANDLER.Fatal(err)
	}

	err = cfg.Validate()
	if err != nil {
		LOGHANDLER.Fatal(ErrInvalidPort)
	}
}
171257
func (c *config) load() error {
	path, err := c.path()
	if err != nil {
		return nil
	}
	return c.loadFromPath(path)
}
1057721
func (m *EventStore) Load(ctx context.Context, id uuid.UUID) ([]eh.Event, error) {
	if m.Err != nil {
		return nil, m.Err
	}
	m.Loaded = id
	m.Context = ctx
	return m.Events, nil
}
320490
func (s *Script) Load(c Conn) error {
	_, err := c.Do("SCRIPT", "LOAD", s.src)
	return err
}
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
}
1116217
func (formats *Formats) Load(urls ...string) error {
	for _, url := range urls {
		err := formats.load(url)
		if err != nil {
			return err
		}
	}
	return nil
}
931122
func Load(configFile string, data interface{}) (quick.Config, error) {
	return quick.LoadConfig(configFile, globalEtcdClient, data)
}
669241
func (j *JSONLoader) Load(s interface{}) error {
	var r io.Reader
	if j.Reader != nil {
		r = j.Reader
	} else if j.Path != "" {
		file, err := getConfig(j.Path)
		if err != nil {
			return err
		}
		defer file.Close()
		r = file
	} else {
		return ErrSourceNotSet
	}

	return json.NewDecoder(r).Decode(s)
}
377050
func (f File) Load(in io.Reader) (err error) {
	bufin, ok := in.(*bufio.Reader)
	if !ok {
		bufin = bufio.NewReader(in)
	}
	return parseFile(bufin, f)
}
515618
func (k *Keyfile) Load() (err error) {
	if len(k.fname) > 0 {
		var f *os.File
		f, err = os.Open(k.fname)
		if err == nil {
			err = k.read(f)
			f.Close()
		}
	}
	return
}
455768
func (r *GormTrackerQueryRepository) Load(ctx context.Context, ID uuid.UUID) (*TrackerQuery, error) {
	defer goa.MeasureSince([]string{"goa", "db", "trackerquery", "load"}, time.Now())
	res := TrackerQuery{}
	tx := r.db.Where("id = ?", ID).Find(&res)
	if tx.RecordNotFound() {
		log.Error(ctx, map[string]interface{}{
			"tracker_id": ID.String(),
		}, "tracker resource not found")
		return nil, errors.NewNotFoundError("tracker query", ID.String())
	}
	if tx.Error != nil {
		log.Error(ctx, map[string]interface{}{
			"err":             tx.Error,
			"trackerquery_id": ID,
		}, "unable to load the trackerquery by ID")
		return nil, errors.NewInternalError(ctx, errs.Wrapf(tx.Error, "failed to load the trackerquery by ID: %s", ID))
	}
	return &res, nil
}
1035452
func Load(file string, v interface{}) error {
	b, err := ioutil.ReadFile(file)
	if err != nil {
		return err
	}

	return Unmarshal(b, v)
}
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
}
518803
func Load(reader io.Reader) (Env, error) {
	r := bufio.NewReader(reader)
	env := make(map[string]string)

	for {
		line, _, err := r.ReadLine()
		if err != nil {
			break
		}

		key, val, err := parseln(string(line))
		if err != nil {
			return env, err
		}

		env[key] = val
		os.Setenv(key, val)
	}

	return env, nil
}
1108849
func (rt *RandomTree) Load(filePath string) error {
	reader, err := base.ReadSerializedClassifierStub(filePath)
	if err != nil {
		return err
	}
	return rt.LoadWithPrefix(reader, "")
}