Skip to content

Commit

Permalink
doc: fix io.Writer examples (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
wdscxsj authored Oct 2, 2023
1 parent b3c6039 commit 6327fb4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ go run *.go
<div>Hello, John</div>
```

Instead of passing `os.Stdout` to the component's render function, you can pass any type that implements the `io.Writer` interface. This includes files, HTTP requests, and HTTP responses.
Instead of passing `os.Stdout` to the component's render function, you can pass any type that implements the `io.Writer` interface. This includes files, `bytes.Buffer`, and HTTP responses.

In this way, templ can be used to generate HTML files that can be hosted as static content in an S3 bucket, Google Cloud Storage, or used to generate HTML that is fed into PDF conversion processes, or sent via email.

0 comments on commit 6327fb4

Please sign in to comment.