Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9d57f45

Browse files
committed
Changed event to be an int
1 parent d240869 commit 9d57f45

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

template.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ import (
2020

2121
var (
2222
ErrorCSSClass = "hasError"
23-
TEMPLATE_REFRESH="template_refresh"
24-
TEMPLATE_REFRESH_COMPLETE="template_refresh_complete"
2523
)
2624

2725
// TemplateLoader object handles loading and parsing of templates.

template_adapter_go.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ func (engine *GoEngine) Lookup(templateName string) Template {
207207
func (engine *GoEngine) Name() string {
208208
return GO_TEMPLATE
209209
}
210-
func (engine *GoEngine) Event(action string, i interface{}) {
210+
func (engine *GoEngine) Event(action int, i interface{}) {
211211
if action == TEMPLATE_REFRESH {
212212
// At this point all the templates have been passed into the
213213
engine.templatesBylowerName = map[string]*GoTemplate{}

template_engine.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type TemplateEngine interface {
2121
// #Event: Fired by the template loader when events occur
2222
// arg: event string
2323
// arg: arg interface{}
24-
Event(event string,arg interface{})
24+
Event(event int,arg interface{})
2525

2626
// #IsEngineFor: returns true if this engine should be used to parse the file specified in baseTemplate
2727
// arg: engine The calling engine
@@ -31,7 +31,10 @@ type TemplateEngine interface {
3131
// #Name: Returns the name of the engine
3232
Name() string
3333
}
34-
34+
const (
35+
TEMPLATE_REFRESH=iota
36+
TEMPLATE_REFRESH_COMPLETE
37+
)
3538
var templateLoaderMap = map[string]func(loader *TemplateLoader) (TemplateEngine, error){}
3639

3740
// Allow for templates to be registered during init but not initialized until application has been started

0 commit comments

Comments
 (0)