mirror of
				https://github.com/gin-gonic/gin.git
				synced 2025-11-04 09:12:12 +08:00 
			
		
		
		
	Merge pull request #32 from alexandernyquist/master
Using template.Must to fix multiple return issue.
This commit is contained in:
		
						commit
						f0282c8ada
					
				@ -260,7 +260,7 @@ You can also use your own html template render
 | 
			
		||||
import "html/template"
 | 
			
		||||
func main() {
 | 
			
		||||
    r := gin.Default()
 | 
			
		||||
    html := template.ParseFiles("file1", "file2")
 | 
			
		||||
    html := template.Must(template.ParseFiles("file1", "file2"))
 | 
			
		||||
    r.HTMLTemplates = html
 | 
			
		||||
 | 
			
		||||
    // Listen and server on 0.0.0.0:8080
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user