Documentation
¶
Overview ¶
Package fluent is the root of the Fluent HTML rendering library. It exposes the buffer pool used throughout the render pipeline so that callers and extensions can borrow and return buffers without taking a direct dependency on the pool package.
The HTML elements live under github.com/jpl-au/fluent/html5, the core node interfaces under github.com/jpl-au/fluent/node, and text nodes under github.com/jpl-au/fluent/text. Optional dot-import constructors live under github.com/jpl-au/fluent/dot.
Most callers never touch this package directly. Calling Render(w) on any node uses the pool transparently; reach for NewBuffer and PutBuffer only when composing renders manually with RenderBuilder.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBuffer ¶
NewBuffer returns a pooled bytes.Buffer sized to the given hint. If no hint is provided, the pool's default sizing applies. Always return the buffer with PutBuffer when finished to avoid leaking pooled memory.
buf := fluent.NewBuffer(256) defer fluent.PutBuffer(buf) node.RenderBuilder(buf)
func PutBuffer ¶
PutBuffer returns a buffer to the pool for reuse. Passing nil is safe. Do not use the buffer after calling PutBuffer - the pool may hand it to another caller at any time.
func SetPoolDiagnostics ¶ added in v0.2.0
SetPoolDiagnostics controls JSONL diagnostic output for the buffer pool. When w is non-nil, every NewBuffer and PutBuffer call writes a single JSON line to w. Pass nil to disable. Safe to call at any time.
Each line contains: op ("get"/"put"), hint, len, cap, and pool ("small", "large", "new", or "discard").
f, _ := os.Create("pool.jsonl")
defer f.Close()
fluent.SetPoolDiagnostics(f)
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package dot provides convenience wrappers for fluent HTML element constructors.
|
Package dot provides convenience wrappers for fluent HTML element constructors. |
|
Package html5 holds the cross-element machinery that the per-element packages under html5/ build on.
|
Package html5 holds the cross-element machinery that the per-element packages under html5/ build on. |
|
a
Package a provides constructors and methods for the HTML <a> element.
|
Package a provides constructors and methods for the HTML <a> element. |
|
abbr
Package abbr provides constructors and methods for the HTML <abbr> element.
|
Package abbr provides constructors and methods for the HTML <abbr> element. |
|
address
Package address provides constructors and methods for the HTML <address> element.
|
Package address provides constructors and methods for the HTML <address> element. |
|
area
Package area provides constructors and methods for the HTML <area> element.
|
Package area provides constructors and methods for the HTML <area> element. |
|
article
Package article provides constructors and methods for the HTML <article> element.
|
Package article provides constructors and methods for the HTML <article> element. |
|
aside
Package aside provides constructors and methods for the HTML <aside> element.
|
Package aside provides constructors and methods for the HTML <aside> element. |
|
attr/accept
Package accept defines the Accept type and its predefined values.
|
Package accept defines the Accept type and its predefined values. |
|
attr/as
Package as defines the As type and its predefined values.
|
Package as defines the As type and its predefined values. |
|
attr/autocapitalize
Package autocapitalize defines the AutoCapitalize type and its predefined values.
|
Package autocapitalize defines the AutoCapitalize type and its predefined values. |
|
attr/autocomplete
Package autocomplete defines the AutoComplete type and its predefined values.
|
Package autocomplete defines the AutoComplete type and its predefined values. |
|
attr/autocorrect
Package autocorrect defines the AutoCorrect type and its predefined values.
|
Package autocorrect defines the AutoCorrect type and its predefined values. |
|
attr/blocking
Package blocking defines the Blocking type and its predefined values.
|
Package blocking defines the Blocking type and its predefined values. |
|
attr/capture
Package capture defines the Capture type and its predefined values.
|
Package capture defines the Capture type and its predefined values. |
|
attr/charset
Package charset defines the Charset type and its predefined values.
|
Package charset defines the Charset type and its predefined values. |
|
attr/contenteditable
Package contenteditable defines the ContentEditable type and its predefined values.
|
Package contenteditable defines the ContentEditable type and its predefined values. |
|
attr/controlslist
Package controlslist defines the ControlsList type and its predefined values.
|
Package controlslist defines the ControlsList type and its predefined values. |
|
attr/crossorigin
Package crossorigin defines the CrossOrigin type and its predefined values.
|
Package crossorigin defines the CrossOrigin type and its predefined values. |
|
attr/decoding
Package decoding defines the Decoding type and its predefined values.
|
Package decoding defines the Decoding type and its predefined values. |
|
attr/dir
Package dir defines the Dir type and its predefined values.
|
Package dir defines the Dir type and its predefined values. |
|
attr/enctype
Package enctype defines the EncType type and its predefined values.
|
Package enctype defines the EncType type and its predefined values. |
|
attr/enterkeyhint
Package enterkeyhint defines the EnterKeyHint type and its predefined values.
|
Package enterkeyhint defines the EnterKeyHint type and its predefined values. |
|
attr/fetchpriority
Package fetchpriority defines the FetchPriority type and its predefined values.
|
Package fetchpriority defines the FetchPriority type and its predefined values. |
|
attr/formmethod
Package formmethod defines the FormMethod type and its predefined values.
|
Package formmethod defines the FormMethod type and its predefined values. |
|
attr/hidden
Package hidden defines the Hidden type and its predefined values.
|
Package hidden defines the Hidden type and its predefined values. |
|
attr/inputmode
Package inputmode defines the InputMode type and its predefined values.
|
Package inputmode defines the InputMode type and its predefined values. |
|
attr/inputtype
Package inputtype defines the InputType type and its predefined values.
|
Package inputtype defines the InputType type and its predefined values. |
|
attr/listtype
Package listtype defines the ListType type and its predefined values.
|
Package listtype defines the ListType type and its predefined values. |
|
attr/loading
Package loading defines the Loading type and its predefined values.
|
Package loading defines the Loading type and its predefined values. |
|
attr/media
Package media defines the Media type and its predefined values.
|
Package media defines the Media type and its predefined values. |
|
attr/method
Package method defines the Method type and its predefined values.
|
Package method defines the Method type and its predefined values. |
|
attr/popover
Package popover defines the Popover type and its predefined values.
|
Package popover defines the Popover type and its predefined values. |
|
attr/popovertargetaction
Package popovertargetaction defines the PopoverTargetAction type and its predefined values.
|
Package popovertargetaction defines the PopoverTargetAction type and its predefined values. |
|
attr/preload
Package preload defines the Preload type and its predefined values.
|
Package preload defines the Preload type and its predefined values. |
|
attr/referrerpolicy
Package referrerpolicy defines the ReferrerPolicy type and its predefined values.
|
Package referrerpolicy defines the ReferrerPolicy type and its predefined values. |
|
attr/rel
Package rel defines the Rel type and its predefined values.
|
Package rel defines the Rel type and its predefined values. |
|
attr/sandbox
Package sandbox defines the Sandbox type and its predefined values.
|
Package sandbox defines the Sandbox type and its predefined values. |
|
attr/shape
Package shape defines the Shape type and its predefined values.
|
Package shape defines the Shape type and its predefined values. |
|
attr/sizes
Package sizes defines the Size type and its predefined values.
|
Package sizes defines the Size type and its predefined values. |
|
attr/spellcheck
Package spellcheck defines the Spellcheck type and its predefined values.
|
Package spellcheck defines the Spellcheck type and its predefined values. |
|
attr/target
Package target defines the Target type and its predefined values.
|
Package target defines the Target type and its predefined values. |
|
attr/translate
Package translate defines the Translate type and its predefined values.
|
Package translate defines the Translate type and its predefined values. |
|
attr/virtualkeyboardpolicy
Package virtualkeyboardpolicy defines the VirtualKeyboardPolicy type and its predefined values.
|
Package virtualkeyboardpolicy defines the VirtualKeyboardPolicy type and its predefined values. |
|
attr/writingsuggestions
Package writingsuggestions defines the WritingSuggestions type and its predefined values.
|
Package writingsuggestions defines the WritingSuggestions type and its predefined values. |
|
audio
Package audio provides constructors and methods for the HTML <audio> element.
|
Package audio provides constructors and methods for the HTML <audio> element. |
|
b
Package b provides constructors and methods for the HTML <b> element.
|
Package b provides constructors and methods for the HTML <b> element. |
|
base
Package base provides constructors and methods for the HTML <base> element.
|
Package base provides constructors and methods for the HTML <base> element. |
|
bdi
Package bdi provides constructors and methods for the HTML <bdi> element.
|
Package bdi provides constructors and methods for the HTML <bdi> element. |
|
bdo
Package bdo provides constructors and methods for the HTML <bdo> element.
|
Package bdo provides constructors and methods for the HTML <bdo> element. |
|
blockquote
Package blockquote provides constructors and methods for the HTML <blockquote> element.
|
Package blockquote provides constructors and methods for the HTML <blockquote> element. |
|
body
Package body provides constructors and methods for the HTML <body> element.
|
Package body provides constructors and methods for the HTML <body> element. |
|
br
Package br provides constructors and methods for the HTML <br> element.
|
Package br provides constructors and methods for the HTML <br> element. |
|
button
Package button provides constructors and methods for the HTML <button> element.
|
Package button provides constructors and methods for the HTML <button> element. |
|
canvas
Package canvas provides constructors and methods for the HTML <canvas> element.
|
Package canvas provides constructors and methods for the HTML <canvas> element. |
|
caption
Package caption provides constructors and methods for the HTML <caption> element.
|
Package caption provides constructors and methods for the HTML <caption> element. |
|
cite
Package cite provides constructors and methods for the HTML <cite> element.
|
Package cite provides constructors and methods for the HTML <cite> element. |
|
code
Package code provides constructors and methods for the HTML <code> element.
|
Package code provides constructors and methods for the HTML <code> element. |
|
col
Package col provides constructors and methods for the HTML <col> element.
|
Package col provides constructors and methods for the HTML <col> element. |
|
colgroup
Package colgroup provides constructors and methods for the HTML <colgroup> element.
|
Package colgroup provides constructors and methods for the HTML <colgroup> element. |
|
data
Package data provides constructors and methods for the HTML <data> element.
|
Package data provides constructors and methods for the HTML <data> element. |
|
datalist
Package datalist provides constructors and methods for the HTML <datalist> element.
|
Package datalist provides constructors and methods for the HTML <datalist> element. |
|
dd
Package dd provides constructors and methods for the HTML <dd> element.
|
Package dd provides constructors and methods for the HTML <dd> element. |
|
del
Package del provides constructors and methods for the HTML <del> element.
|
Package del provides constructors and methods for the HTML <del> element. |
|
details
Package details provides constructors and methods for the HTML <details> element.
|
Package details provides constructors and methods for the HTML <details> element. |
|
dfn
Package dfn provides constructors and methods for the HTML <dfn> element.
|
Package dfn provides constructors and methods for the HTML <dfn> element. |
|
dialog
Package dialog provides constructors and methods for the HTML <dialog> element.
|
Package dialog provides constructors and methods for the HTML <dialog> element. |
|
div
Package div provides constructors and methods for the HTML <div> element.
|
Package div provides constructors and methods for the HTML <div> element. |
|
dl
Package dl provides constructors and methods for the HTML <dl> element.
|
Package dl provides constructors and methods for the HTML <dl> element. |
|
dropdown
Package dropdown provides constructors and methods for the HTML <select> element.
|
Package dropdown provides constructors and methods for the HTML <select> element. |
|
dt
Package dt provides constructors and methods for the HTML <dt> element.
|
Package dt provides constructors and methods for the HTML <dt> element. |
|
em
Package em provides constructors and methods for the HTML <em> element.
|
Package em provides constructors and methods for the HTML <em> element. |
|
embed
Package embed provides constructors and methods for the HTML <embed> element.
|
Package embed provides constructors and methods for the HTML <embed> element. |
|
fieldset
Package fieldset provides constructors and methods for the HTML <fieldset> element.
|
Package fieldset provides constructors and methods for the HTML <fieldset> element. |
|
figcaption
Package figcaption provides constructors and methods for the HTML <figcaption> element.
|
Package figcaption provides constructors and methods for the HTML <figcaption> element. |
|
figure
Package figure provides constructors and methods for the HTML <figure> element.
|
Package figure provides constructors and methods for the HTML <figure> element. |
|
footer
Package footer provides constructors and methods for the HTML <footer> element.
|
Package footer provides constructors and methods for the HTML <footer> element. |
|
form
Package form provides constructors and methods for the HTML <form> element.
|
Package form provides constructors and methods for the HTML <form> element. |
|
h1
Package h1 provides constructors and methods for the HTML <h1> element.
|
Package h1 provides constructors and methods for the HTML <h1> element. |
|
h2
Package h2 provides constructors and methods for the HTML <h2> element.
|
Package h2 provides constructors and methods for the HTML <h2> element. |
|
h3
Package h3 provides constructors and methods for the HTML <h3> element.
|
Package h3 provides constructors and methods for the HTML <h3> element. |
|
h4
Package h4 provides constructors and methods for the HTML <h4> element.
|
Package h4 provides constructors and methods for the HTML <h4> element. |
|
h5
Package h5 provides constructors and methods for the HTML <h5> element.
|
Package h5 provides constructors and methods for the HTML <h5> element. |
|
h6
Package h6 provides constructors and methods for the HTML <h6> element.
|
Package h6 provides constructors and methods for the HTML <h6> element. |
|
head
Package head provides constructors and methods for the HTML <head> element.
|
Package head provides constructors and methods for the HTML <head> element. |
|
header
Package header provides constructors and methods for the HTML <header> element.
|
Package header provides constructors and methods for the HTML <header> element. |
|
hgroup
Package hgroup provides constructors and methods for the HTML <hgroup> element.
|
Package hgroup provides constructors and methods for the HTML <hgroup> element. |
|
hr
Package hr provides constructors and methods for the HTML <hr> element.
|
Package hr provides constructors and methods for the HTML <hr> element. |
|
html
Package html provides constructors and methods for the HTML <html> element.
|
Package html provides constructors and methods for the HTML <html> element. |
|
i
Package i provides constructors and methods for the HTML <i> element.
|
Package i provides constructors and methods for the HTML <i> element. |
|
iframe
Package iframe provides constructors and methods for the HTML <iframe> element.
|
Package iframe provides constructors and methods for the HTML <iframe> element. |
|
imagemap
Package imagemap provides constructors and methods for the HTML <map> element.
|
Package imagemap provides constructors and methods for the HTML <map> element. |
|
img
Package img provides constructors and methods for the HTML <img> element.
|
Package img provides constructors and methods for the HTML <img> element. |
|
input
Package input provides constructors and methods for the HTML <input> element.
|
Package input provides constructors and methods for the HTML <input> element. |
|
ins
Package ins provides constructors and methods for the HTML <ins> element.
|
Package ins provides constructors and methods for the HTML <ins> element. |
|
kbd
Package kbd provides constructors and methods for the HTML <kbd> element.
|
Package kbd provides constructors and methods for the HTML <kbd> element. |
|
label
Package label provides constructors and methods for the HTML <label> element.
|
Package label provides constructors and methods for the HTML <label> element. |
|
legend
Package legend provides constructors and methods for the HTML <legend> element.
|
Package legend provides constructors and methods for the HTML <legend> element. |
|
li
Package li provides constructors and methods for the HTML <li> element.
|
Package li provides constructors and methods for the HTML <li> element. |
|
link
Package link provides constructors and methods for the HTML <link> element.
|
Package link provides constructors and methods for the HTML <link> element. |
|
mark
Package mark provides constructors and methods for the HTML <mark> element.
|
Package mark provides constructors and methods for the HTML <mark> element. |
|
math
Package math provides constructors and methods for the HTML <math> element.
|
Package math provides constructors and methods for the HTML <math> element. |
|
menu
Package menu provides constructors and methods for the HTML <menu> element.
|
Package menu provides constructors and methods for the HTML <menu> element. |
|
meta
Package meta provides constructors and methods for the HTML <meta> element.
|
Package meta provides constructors and methods for the HTML <meta> element. |
|
meter
Package meter provides constructors and methods for the HTML <meter> element.
|
Package meter provides constructors and methods for the HTML <meter> element. |
|
nav
Package nav provides constructors and methods for the HTML <nav> element.
|
Package nav provides constructors and methods for the HTML <nav> element. |
|
noscript
Package noscript provides constructors and methods for the HTML <noscript> element.
|
Package noscript provides constructors and methods for the HTML <noscript> element. |
|
object
Package object provides constructors and methods for the HTML <object> element.
|
Package object provides constructors and methods for the HTML <object> element. |
|
ol
Package ol provides constructors and methods for the HTML <ol> element.
|
Package ol provides constructors and methods for the HTML <ol> element. |
|
optgroup
Package optgroup provides constructors and methods for the HTML <optgroup> element.
|
Package optgroup provides constructors and methods for the HTML <optgroup> element. |
|
option
Package option provides constructors and methods for the HTML <option> element.
|
Package option provides constructors and methods for the HTML <option> element. |
|
output
Package output provides constructors and methods for the HTML <output> element.
|
Package output provides constructors and methods for the HTML <output> element. |
|
p
Package p provides constructors and methods for the HTML <p> element.
|
Package p provides constructors and methods for the HTML <p> element. |
|
picture
Package picture provides constructors and methods for the HTML <picture> element.
|
Package picture provides constructors and methods for the HTML <picture> element. |
|
pre
Package pre provides constructors and methods for the HTML <pre> element.
|
Package pre provides constructors and methods for the HTML <pre> element. |
|
primary
Package primary provides constructors and methods for the HTML <main> element.
|
Package primary provides constructors and methods for the HTML <main> element. |
|
progress
Package progress provides constructors and methods for the HTML <progress> element.
|
Package progress provides constructors and methods for the HTML <progress> element. |
|
q
Package q provides constructors and methods for the HTML <q> element.
|
Package q provides constructors and methods for the HTML <q> element. |
|
rp
Package rp provides constructors and methods for the HTML <rp> element.
|
Package rp provides constructors and methods for the HTML <rp> element. |
|
rt
Package rt provides constructors and methods for the HTML <rt> element.
|
Package rt provides constructors and methods for the HTML <rt> element. |
|
ruby
Package ruby provides constructors and methods for the HTML <ruby> element.
|
Package ruby provides constructors and methods for the HTML <ruby> element. |
|
s
Package s provides constructors and methods for the HTML <s> element.
|
Package s provides constructors and methods for the HTML <s> element. |
|
samp
Package samp provides constructors and methods for the HTML <samp> element.
|
Package samp provides constructors and methods for the HTML <samp> element. |
|
script
Package script provides constructors and methods for the HTML <script> element.
|
Package script provides constructors and methods for the HTML <script> element. |
|
search
Package search provides constructors and methods for the HTML <search> element.
|
Package search provides constructors and methods for the HTML <search> element. |
|
section
Package section provides constructors and methods for the HTML <section> element.
|
Package section provides constructors and methods for the HTML <section> element. |
|
slot
Package slot provides constructors and methods for the HTML <slot> element.
|
Package slot provides constructors and methods for the HTML <slot> element. |
|
small
Package small provides constructors and methods for the HTML <small> element.
|
Package small provides constructors and methods for the HTML <small> element. |
|
source
Package source provides constructors and methods for the HTML <source> element.
|
Package source provides constructors and methods for the HTML <source> element. |
|
span
Package span provides constructors and methods for the HTML <span> element.
|
Package span provides constructors and methods for the HTML <span> element. |
|
strong
Package strong provides constructors and methods for the HTML <strong> element.
|
Package strong provides constructors and methods for the HTML <strong> element. |
|
style
Package style provides constructors and methods for the HTML <style> element.
|
Package style provides constructors and methods for the HTML <style> element. |
|
sub
Package sub provides constructors and methods for the HTML <sub> element.
|
Package sub provides constructors and methods for the HTML <sub> element. |
|
summary
Package summary provides constructors and methods for the HTML <summary> element.
|
Package summary provides constructors and methods for the HTML <summary> element. |
|
sup
Package sup provides constructors and methods for the HTML <sup> element.
|
Package sup provides constructors and methods for the HTML <sup> element. |
|
svg
Package svg provides constructors and methods for the HTML <svg> element.
|
Package svg provides constructors and methods for the HTML <svg> element. |
|
table
Package table provides constructors and methods for the HTML <table> element.
|
Package table provides constructors and methods for the HTML <table> element. |
|
tbody
Package tbody provides constructors and methods for the HTML <tbody> element.
|
Package tbody provides constructors and methods for the HTML <tbody> element. |
|
td
Package td provides constructors and methods for the HTML <td> element.
|
Package td provides constructors and methods for the HTML <td> element. |
|
template
Package template provides constructors and methods for the HTML <template> element.
|
Package template provides constructors and methods for the HTML <template> element. |
|
textarea
Package textarea provides constructors and methods for the HTML <textarea> element.
|
Package textarea provides constructors and methods for the HTML <textarea> element. |
|
tfoot
Package tfoot provides constructors and methods for the HTML <tfoot> element.
|
Package tfoot provides constructors and methods for the HTML <tfoot> element. |
|
th
Package th provides constructors and methods for the HTML <th> element.
|
Package th provides constructors and methods for the HTML <th> element. |
|
thead
Package thead provides constructors and methods for the HTML <thead> element.
|
Package thead provides constructors and methods for the HTML <thead> element. |
|
time
Package time provides constructors and methods for the HTML <time> element.
|
Package time provides constructors and methods for the HTML <time> element. |
|
title
Package title provides constructors and methods for the HTML <title> element.
|
Package title provides constructors and methods for the HTML <title> element. |
|
tr
Package tr provides constructors and methods for the HTML <tr> element.
|
Package tr provides constructors and methods for the HTML <tr> element. |
|
track
Package track provides constructors and methods for the HTML <track> element.
|
Package track provides constructors and methods for the HTML <track> element. |
|
u
Package u provides constructors and methods for the HTML <u> element.
|
Package u provides constructors and methods for the HTML <u> element. |
|
ul
Package ul provides constructors and methods for the HTML <ul> element.
|
Package ul provides constructors and methods for the HTML <ul> element. |
|
variable
Package variable provides constructors and methods for the HTML <var> element.
|
Package variable provides constructors and methods for the HTML <var> element. |
|
video
Package video provides constructors and methods for the HTML <video> element.
|
Package video provides constructors and methods for the HTML <video> element. |
|
wbr
Package wbr provides constructors and methods for the HTML <wbr> element.
|
Package wbr provides constructors and methods for the HTML <wbr> element. |
|
Package node defines the interfaces and helpers that compose a fluent render tree.
|
Package node defines the interfaces and helpers that compose a fluent render tree. |
|
Package pool provides the two-tier sync.Pool used by every Fluent render call.
|
Package pool provides the two-tier sync.Pool used by every Fluent render call. |
|
Package text provides the leaf text nodes of the Fluent render tree.
|
Package text provides the leaf text nodes of the Fluent render tree. |