Skip to content

Golang library to produce HTML with functions instead of templates

Notifications You must be signed in to change notification settings

jpincas/htmlfunc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Functional HTML Library for Go

A library to help you write HTML layouts as regular Go functions, rather than using a template.

Heavily inspired by the way Elm does HTML output - in fact, bar a few tweaks to help suit Go's syntax a bit better, it's almost identical.

Currently being developed on an 'as needed' basis, so please feel free to add missing elements if you want/need them.

See the test file for a complete example of an HTML page written with htmlfunc

Tests

Kind of tricky to test, but running ./test.sh will generate an index.html and test it against the vnu html validator if you have it installed.

Inspecting the HTML is handy development crutch, and then visually checking over the file in a browser should help confirm the output is an intended.

About

Golang library to produce HTML with functions instead of templates

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published