Documentation ¶
Overview ¶
Package nohtml provides functions to build web apps without HTML.
Index ¶
- func Handler(v interface{}) http.Handler
- type Context
- func (c *Context) AppendHash(hashElement string) *Context
- func (c *Context) AppendPath(pathElement string) *Context
- func (c *Context) Context() context.Context
- func (c *Context) Element(tag string, children ...*html.Node) *html.Node
- func (c *Context) HRef() string
- func (c *Context) Hash() (string, *Context)
- func (c *Context) Link(label, href string) *html.Node
- func (c *Context) Path() (string, *Context)
- func (c *Context) Render(v interface{}, parent *html.Node)
- func (c *Context) RenderNavContainer(parent *html.Node) (options, contents *html.Node)
- func (c *Context) Text(content string) *html.Node
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context tracks a request context.
func (*Context) AppendHash ¶
AppendHash returns a new context with the provided hash element appended to it.
func (*Context) AppendPath ¶
AppendPath returns a new context with the provided path element appended to it.
func (*Context) Hash ¶
Hash returns the first element in the request hash and returns a sub-context (which has the rest of the hash).
func (*Context) Path ¶
Path returns the first element in the request path and returns a sub-context (which has the rest of the path).
func (*Context) RenderNavContainer ¶
RenderNavContainer renders a simple nav container with a sub container for options and contents.
Click to show internal directories.
Click to hide internal directories.