-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Add Write and WritePartial helper functions to the candango/uiok project. These functions should simplify writing the output of components or their partials directly to an io.Writer (such as http.ResponseWriter or bytes.Buffer), improving usability and integration with HTTP handlers.
Tasks
- Implement a
Write(w io.Writer, c Component) errorfunction that writes the fully rendered output of a component to the provided writer. - Implement a
WritePartial(w io.Writer, c Component) errorfunction that writes only the partial output of a component to the writer. - Both functions should handle errors gracefully and ensure all output is written.
- Add documentation and usage examples for both helpers.
- Create basic tests to verify that output is correctly written for various types of components.
Acceptance Criteria
- The codebase includes the new
WriteandWritePartialhelper functions. - Functions work seamlessly with any
io.Writer(includinghttp.ResponseWriter). - Usage examples are present in code, docs, or examples directory.
- Functions are covered by basic tests and error cases.
- Code builds and all tests pass.
Reactions are currently unavailable