File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,6 @@ import (
20
20
21
21
var (
22
22
ErrorCSSClass = "hasError"
23
- TEMPLATE_REFRESH = "template_refresh"
24
- TEMPLATE_REFRESH_COMPLETE = "template_refresh_complete"
25
23
)
26
24
27
25
// TemplateLoader object handles loading and parsing of templates.
Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ func (engine *GoEngine) Lookup(templateName string) Template {
207
207
func (engine * GoEngine ) Name () string {
208
208
return GO_TEMPLATE
209
209
}
210
- func (engine * GoEngine ) Event (action string , i interface {}) {
210
+ func (engine * GoEngine ) Event (action int , i interface {}) {
211
211
if action == TEMPLATE_REFRESH {
212
212
// At this point all the templates have been passed into the
213
213
engine .templatesBylowerName = map [string ]* GoTemplate {}
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ type TemplateEngine interface {
21
21
// #Event: Fired by the template loader when events occur
22
22
// arg: event string
23
23
// arg: arg interface{}
24
- Event (event string ,arg interface {})
24
+ Event (event int ,arg interface {})
25
25
26
26
// #IsEngineFor: returns true if this engine should be used to parse the file specified in baseTemplate
27
27
// arg: engine The calling engine
@@ -31,7 +31,10 @@ type TemplateEngine interface {
31
31
// #Name: Returns the name of the engine
32
32
Name () string
33
33
}
34
-
34
+ const (
35
+ TEMPLATE_REFRESH = iota
36
+ TEMPLATE_REFRESH_COMPLETE
37
+ )
35
38
var templateLoaderMap = map [string ]func (loader * TemplateLoader ) (TemplateEngine , error ){}
36
39
37
40
// Allow for templates to be registered during init but not initialized until application has been started
You can’t perform that action at this time.
0 commit comments