Using template.Must to fix multiple return issue.
This commit is contained in:
		@ -259,7 +259,7 @@ You can also use your own html template render
 | 
				
			|||||||
import "html/template"
 | 
					import "html/template"
 | 
				
			||||||
func main() {
 | 
					func main() {
 | 
				
			||||||
    r := gin.Default()
 | 
					    r := gin.Default()
 | 
				
			||||||
    html := template.ParseFiles("file1", "file2")
 | 
					    html := template.Must(template.ParseFiles("file1", "file2"))
 | 
				
			||||||
    r.HTMLTemplates = html
 | 
					    r.HTMLTemplates = html
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Listen and server on 0.0.0.0:8080
 | 
					    // Listen and server on 0.0.0.0:8080
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user