fix conflict
This commit is contained in:
@ -432,13 +432,17 @@ func (s *Server) Run() {
|
||||
s.logger.Panicf("Unable to parse: path=%s, err=%s", path, err)
|
||||
}
|
||||
|
||||
_, err = htmlTemplates.New(stripPrefix(path)).Parse(string(bytes))
|
||||
if err != nil {
|
||||
s.logger.Println("Unable to parse html template", err)
|
||||
if strings.HasSuffix(path, ".html") {
|
||||
_, err = htmlTemplates.New(stripPrefix(path)).Parse(string(bytes))
|
||||
if err != nil {
|
||||
s.logger.Println("Unable to parse html template", err)
|
||||
}
|
||||
}
|
||||
_, err = textTemplates.New(stripPrefix(path)).Parse(string(bytes))
|
||||
if err != nil {
|
||||
s.logger.Println("Unable to parse text template", err)
|
||||
if strings.HasSuffix(path, ".txt") {
|
||||
_, err = textTemplates.New(stripPrefix(path)).Parse(string(bytes))
|
||||
if err != nil {
|
||||
s.logger.Println("Unable to parse text template", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user