mirror of
				https://github.com/labstack/echo.git
				synced 2025-10-30 23:57:38 +02:00 
			
		
		
		
	fix grammar, spelling, highlight
This commit is contained in:
		| @@ -135,7 +135,7 @@ e.Use(mw.BasicAuth(func(usr, pwd string) bool { | |||||||
|  |  | ||||||
| ### URI building | ### URI building | ||||||
|  |  | ||||||
| `Echo.URI` can be used generate URI for any handler with specified path parameters. | `Echo.URI` can be used to generate URI for any handler with specified path parameters. | ||||||
| It's helpful to centralize all your URI patterns which ease in refactoring your | It's helpful to centralize all your URI patterns which ease in refactoring your | ||||||
| application. | application. | ||||||
|  |  | ||||||
| @@ -290,10 +290,10 @@ $ curl -d "name=joe" http://localhost:1323/users | |||||||
| Context.Render(code int, name string, data interface{}) error | Context.Render(code int, name string, data interface{}) error | ||||||
| ``` | ``` | ||||||
| Renders a template with data and sends a text/html response with status code. Templates | Renders a template with data and sends a text/html response with status code. Templates | ||||||
| can be registered using `Echo.SetRenderer()`, allowing us to use any templating engine. | can be registered using `Echo.SetRenderer()`, allowing us to use any template engine. | ||||||
| Below is an example using Go `html/template` | Below is an example using Go `html/template` | ||||||
|  |  | ||||||
| Implement `echo.Render` | Implementing `echo.Render` interface | ||||||
|  |  | ||||||
| ```go | ```go | ||||||
| Template struct { | Template struct { | ||||||
| @@ -374,7 +374,7 @@ Sends a text/plain HTTP response with status code. | |||||||
| Context.File(name string, attachment bool) error | Context.File(name string, attachment bool) error | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
| File sends a response with the content of the file. If attachment is true, the client | File sends a response with the content of the file. If attachment is `true`, the client | ||||||
| is prompted to save the file. | is prompted to save the file. | ||||||
|  |  | ||||||
| ### Static files | ### Static files | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user