// Init this module.
189163
func (m *Module) Init(c *service.Config) {
	c.Start = func() {
		for _, p := range m.oauthConfigs {
			m.register(p)
		}
	}
}
794623
func (p *Plugin) Init() error {
	if p.Cfg != nil {
		if p.Config == nil {
			p.Config = NewConf()
		}

		_, err := p.Cfg.LoadValue(p.Config)
		if err != nil {
			return err
		}
		p.Log.Debugf("logs config: %+v", p.Config)

		// Handle default log level. Prefer value from environmental variable
		defaultLogLvl := os.Getenv("INITIAL_LOGLVL")
		if defaultLogLvl == "" {
			defaultLogLvl = p.Config.DefaultLevel
		}
		if defaultLogLvl != "" {
			if err := p.LogRegistry.SetLevel("default", defaultLogLvl); err != nil {
				p.Log.Warnf("setting default log level failed: %v", err)
			} else {
				// All loggers created up to this point were created with initial log level set (defined
				// via INITIAL_LOGLVL env. variable with value 'info' by default), so at first, let's set default
				// log level for all of them.
				for loggerName := range p.LogRegistry.ListLoggers() {
					logger, exists := p.LogRegistry.Lookup(loggerName)
					if !exists {
						continue
					}
					logger.SetLevel(logging.ParseLogLevel(defaultLogLvl))
				}
			}
		}

		// Handle config file log levels
		for _, logCfgEntry := range p.Config.Loggers {
			// Put log/level entries from configuration file to the registry.
			if err := p.LogRegistry.SetLevel(logCfgEntry.Name, logCfgEntry.Level); err != nil {
				// Intentionally just log warn & not propagate the error (it is minor thing to interrupt startup)
				p.Log.Warnf("setting log level %s for logger %s failed: %v",
					logCfgEntry.Level, logCfgEntry.Name, err)
			}
		}
		if len(p.Config.Hooks) > 0 {
			p.Log.Info("configuring log hooks")
			for hookName, hookConfig := range p.Config.Hooks {
				if err := p.addHook(hookName, hookConfig); err != nil {
					p.Log.Warnf("configuring log hook %s failed: %v", hookName, err)
				}
			}
		}
	}

	return nil
}
609414
func (c *Cmd) Init() {
	c.Lock()
	defer c.Unlock()

	c.exitCh = make(chan struct{})
}
1187384
func (g *Generator) init() {
	g.filedInit = []string{}
	g.imports = map[string]bool{}
	g.pooledObjects = map[string]string{}
	g.structTypes = map[string]string{}
	g.sliceTypes = map[string]string{}
	g.poolInit = map[string]string{}
	g.addImport(gojayPackage)
	// if we want pools, add the sync package right away
	if g.options.PoolObjects {
		g.addImport("sync")
	}
}
899497
func Init() bool {
	initializer, exists := registeredInitializers[os.Args[0]]
	if exists {
		initializer()

		return true
	}
	return false
}
1197198
func Init(l ...Logger) {
	for _, logger := range l {
		gl.loggers = append(gl.loggers, logger)
	}
}
684266
func (session *Session) Init() {
	session.Statement.Init()
	session.Statement.Engine = session.Engine
	session.IsAutoCommit = true
	session.IsCommitedOrRollbacked = false
	session.IsAutoClose = false
	session.AutoResetStatement = true
	session.prepareStmt = false

	// !nashtsai! is lazy init better?
	session.afterInsertBeans = make(map[interface{}]*[]func(interface{}), 0)
	session.afterUpdateBeans = make(map[interface{}]*[]func(interface{}), 0)
	session.afterDeleteBeans = make(map[interface{}]*[]func(interface{}), 0)
	session.beforeClosures = make([]func(interface{}), 0)
	session.afterClosures = make([]func(interface{}), 0)

	session.lastSQLArgs = []interface{}{}
}
803890
func (s *Scanner) init() (err error) {
	if s.b != nil {
		return nil
	}
	s.b, err = ioutil.ReadAll(s.r)
	return err
}
165794
func init() {
	wallet.UseLogger(walletLog)
	wtxmgr.UseLogger(txmgrLog)
	chain.UseLogger(chainLog)
	rpcclient.UseLogger(chainLog)
	rpcserver.UseLogger(grpcLog)
	legacyrpc.UseLogger(legacyRPCLog)
	neutrino.UseLogger(btcnLog)
}
999806
func init() {
	Log.Out = os.Stdout
	if Debug {
		Log.Level = logger.DebugLevel
	}
}
714770
func (m *Module) Init(c *service.Config) {
	c.Setup = func() error {
		m.keyStore = &keystore.KeyStore{}
		m.keyFile = defaultKeyFile
		m.csrfValidityDuration = defaultCSRFValidity
		return nil
	}

	c.Start = func() {
		var err error
		privateKey, publicKey, err := loadKeys(m.keyFile, m.keyStore)
		if err != nil {
			panic(err)
		}
		m.decryptionKey = privateKey
		m.encrypter, err = jose.NewEncrypter(keyAlgorithm, contentEncryption, publicKey)
		if err != nil {
			panic(err)
		}
	}
}
1340366
func (p *Policy) init() {
	if !p.initialized {
		p.elsAndAttrs = make(map[string]map[string]attrPolicy)
		p.globalAttrs = make(map[string]attrPolicy)
		p.allowURLSchemes = make(map[string]urlPolicy)
		p.setOfElementsAllowedWithoutAttrs = make(map[string]struct{})
		p.setOfElementsToSkipContent = make(map[string]struct{})
		p.initialized = true
	}
}
374412
func (self *StructTypeDef) Init() *StructTypeDef {
	if self.Fields == nil {
		self.Fields = make([]*StructFieldDef, 0)
	}
	return self
}
1103191
func (m *Module) Init(c *service.Config) {
	c.Setup = func() error {
		m.Router.HTTPRouter.NotFound = m
		m.staticBasePath = defaultStaticBasePath
		m.staticDirs = defaultStaticDirs
		m.handle404 = m.DefaultHandle404
		m.handle500 = m.DefaultHandle500
		return nil
	}
	c.Start = func() {
		m.Router.Root.Handle(m.staticBasePath, m)
	}
}
1052539
func init() {
	revel.RegisterServerEngine("fasthttp", func() revel.ServerEngine {
		return &FastHTTPServer{}
	})
	revel.RegisterModuleInit(func(m *revel.Module) {
		serverLog = m.Log
	})
}
944681
func (p *MemProvider) Init(maxLifetime int64, _ string) error {
	p.lock.Lock()
	p.maxLifetime = maxLifetime
	p.lock.Unlock()
	return nil
}
1219916
func init() {
	cli.AppHelpTemplate = AppHelpTemplate
	cli.CommandHelpTemplate = CommandHelpTemplate
	cli.SubcommandHelpTemplate = SubcommandHelpTemplate
}