# Avoid passing `r.w` explicitly to renderer methods Most of the `Renderer` methods pass the renderer's writer `r.w` as an explicit argument. But it is already encapsulated in the object or the pointer. For example: ```go if err := r.renderDescriptions(r.w, p.Description, p.URL); err != nil { return err } if err := r.renderExamples(r.w, p.Examples); err != nil { return err } ``` The writer could instead be accessed directly inside these methods: ```go if err := r.renderDescriptions(p.Description, p.URL); err != nil { return err } if err := r.renderExamples(p.Examples); err != nil { return err } ```
Activity
TheRootDaemon commentedon Oct 26, 2026
Resolved in #23