// Open adds python defaults.
511164
func (p *Plugin) Open(fn *function.Function) error {
	if !strings.HasPrefix(fn.Runtime, "python") {
		return nil
	}

	// Support "python" for backwards compat.
	if fn.Runtime == "python" {
		fn.Runtime = "python2.7"
	}

	if fn.Handler == "" {
		fn.Handler = "main.handle"
	}

	return nil
}
627176
func Open(pidfile string) (*os.Process, error) {
	pid, err := readPidFile(pidfile)
	if err != nil {
		return nil, fmt.Errorf("open pid file %s falied, %s", pidfile, err)
	}
	return os.FindProcess(pid)
}
1036923
func (o osFileSystem) Open(name string) (http.File, error) {
	return o(name)
}
622767
func (o *LargeObjects) Open(oid pgtype.OID, mode LargeObjectMode) (*LargeObject, error) {
	fd, err := fpInt32(o.fp.CallFn("lo_open", []fpArg{fpIntArg(int32(oid)), fpIntArg(int32(mode))}))
	return &LargeObject{fd: fd, lo: o}, err
}
384325
func (fs *languageCompositeFs) Open(name string) (afero.File, error) {
	f, err := fs.CopyOnWriteFs.Open(name)
	if err != nil {
		return nil, err
	}

	fu, ok := f.(*afero.UnionFile)
	if ok {
		// This is a directory: Merge it.
		fu.Merger = LanguageDirsMerger
	}
	return f, nil
}
111427
func Open(l *lua.State) {
	reOpen := func(l *lua.State) int {
		lua.NewLibrary(l, regexpLibrary)
		return 1
	}
	lua.Require(l, "goluago/regexp", reOpen, false)
	l.Pop(1)
}
1029208
func Open(name string, options ...func(*Term) error) (*Term, error) {
	return nil, errNotSupported
}
1158723
func (o *LinuxOpener) Open(u string, windowType WindowType, autoRaise bool) error {
	if getEnv("DISPLAY", o.Env) == "" {
		return &RequireXError{}
	}
	cmd := exec.Command("xdg-open", u)
	return cmd.Run()
}
218144
func (e *RecoverIndexExec) Open(ctx context.Context) error {
	if err := e.baseExecutor.Open(ctx); err != nil {
		return err
	}

	e.srcChunk = chunk.New(e.columnsTypes(), e.initCap, e.maxChunkSize)
	e.batchSize = 2048
	e.recoverRows = make([]recoverRows, 0, e.batchSize)
	e.idxValsBufs = make([][]types.Datum, e.batchSize)
	e.idxKeyBufs = make([][]byte, e.batchSize)
	return nil
}
3110
func (c *Connection) Open() error {
	if c.Store != nil {
		return nil
	}
	if c.Dialect == nil {
		return errors.New("invalid connection instance")
	}
	details := c.Dialect.Details()
	db, err := sqlx.Open(details.Dialect, c.Dialect.URL())
	if err != nil {
		return errors.Wrap(err, "could not open database connection")
	}
	db.SetMaxOpenConns(details.Pool)
	db.SetMaxIdleConns(details.IdlePool)
	c.Store = &dB{db}

	if d, ok := c.Dialect.(afterOpenable); ok {
		err = d.AfterOpen(c)
		if err != nil {
			c.Store = nil
		}
	}
	return errors.Wrap(err, "could not open database connection")
}
37848
func (f *Function) Open(environment string) error {
	f.defaults()

	f.Log = f.Log.WithFields(log.Fields{
		"function": f.Name,
		"env":      environment,
	})

	f.Log.Debug("open")

	if err := f.loadConfig(environment); err != nil {
		return errors.Wrap(err, "loading config")
	}

	if err := f.hookOpen(); err != nil {
		return errors.Wrap(err, "open hook")
	}

	if err := validator.Validate(&f.Config); err != nil {
		return errors.Wrap(err, "validating")
	}

	ignoreFile, err := utils.ReadIgnoreFile(f.Path)
	if err != nil {
		return errors.Wrap(err, "reading ignore file")
	}

	f.IgnoreFile = append(f.IgnoreFile, []byte("\n")...)
	f.IgnoreFile = append(f.IgnoreFile, ignoreFile...)

	return nil
}
20252
func (e *ReplaceExec) Open(ctx context.Context) error {
	if e.SelectExec != nil {
		return e.SelectExec.Open(ctx)
	}
	e.initEvalBuffer()
	return nil
}
1301515
func Open(address, target string) (*sql.DB, error) {
	c := Configuration{
		Address: address,
		Target:  target,
	}
	return OpenWithConfiguration(c)
}
111783
func Open(options ...Option) (*Database, error) {
	db := &Database{
		address:    defaultSocket,
		network:    defaultNetwork,
		timeout:    defaultTimeout,
		index:      defaultIndex,
		password:   defaultPassword,
		poolsize:   defaultPoolSize,
		logging:    defaultLogging,
		monitoring: defaultMonitoring,
	}
	for _, option := range options {
		if err := option(db); err != nil {
			return nil, err
		}
	}
	db.pool = newPool(db)
	return db, nil
}
379159
func Open(u string, windowState WindowType, autoRaise bool) error {
	o := runtime.GOOS

	opener, err := detectBrowsers(o)
	if err != nil {
		return err
	}

	return opener.Open(u, windowState, autoRaise)
}
58622
func (fs *FS) Open(filename string) (billy.File, error) {
	return fs.OpenFile(filename, os.O_RDONLY, 0600)
}
886505
func (l *httpFileSystemLoader) Open(name string) (io.ReadCloser, error) {
	if l.fs == nil {
		return nil, &os.PathError{Op: "open", Path: name, Err: os.ErrNotExist}
	}
	return l.fs.Open(name)
}