Beispiel #1
0
func (httpContext *httpContextDef) gameInit() *gkerr.GkErrDef {
	var gkErr *gkerr.GkErrDef

	_gameTemplate, gkErr = gktmpl.NewTemplate(httpContext.gameConfig.TemplateDir, _gameTemplateName)
	if gkErr != nil {
		return gkErr
	}

	_errorTemplate, gkErr = gktmpl.NewTemplate(httpContext.gameConfig.TemplateDir, _errorTemplateName)
	if gkErr != nil {
		return gkErr
	}

	return nil
}
Beispiel #2
0
func (loginConfig *loginConfigDef) loginInit() *gkerr.GkErrDef {
	var gkErr *gkerr.GkErrDef

	//	var fileNames []string

	//	fileNames = []string{"main", "head", "error_list", "login"}
	_loginTemplate, gkErr = gktmpl.NewTemplate(loginConfig.TemplateDir, _loginTemplateName)
	if gkErr != nil {
		return gkErr
	}

	//	fileNames = []string{"main", "head", "error_list", "register"}
	_registerTemplate, gkErr = gktmpl.NewTemplate(loginConfig.TemplateDir, _registerTemplateName)
	if gkErr != nil {
		return gkErr
	}

	//	fileNames = []string{"main", "head", "error_list", "error"}
	_errorTemplate, gkErr = gktmpl.NewTemplate(loginConfig.TemplateDir, _errorTemplateName)
	if gkErr != nil {
		return gkErr
	}

	_forgotPasswordTemplate, gkErr = gktmpl.NewTemplate(loginConfig.TemplateDir, _forgotPasswordTemplateName)
	if gkErr != nil {
		return gkErr
	}

	_forgotPasswordEmailTemplate, gkErr = gktmpl.NewTemplate(loginConfig.TemplateDir, _forgotPasswordEmailTemplateName)
	if gkErr != nil {
		return gkErr
	}

	_resetPasswordTemplate, gkErr = gktmpl.NewTemplate(loginConfig.TemplateDir, _resetPasswordTemplateName)
	if gkErr != nil {
		return gkErr
	}

	return nil
}