HTML generation DSL for Go
Go to file
2019-04-22 22:12:12 -06:00
attribute Added float attribute type 2019-04-22 22:12:12 -06:00
element Rearranged generated code 2019-04-02 21:42:16 -06:00
internal/codegen Added float attribute type 2019-04-22 22:12:12 -06:00
.gitlab-ci.yml Check more stuff in CI 2019-04-17 21:06:01 -06:00
ci_check Check more stuff in CI 2019-04-17 21:06:01 -06:00
COPYING Added license and readme 2019-04-17 22:32:53 -06:00
defs.json Added float attribute type 2019-04-22 22:12:12 -06:00
go.mod Added all non-obsolete, non-experimental attribs from MDN 2019-04-08 21:52:26 -06:00
go.sum Added all non-obsolete, non-experimental attribs from MDN 2019-04-08 21:52:26 -06:00
hatmill_test.go Added float attribute type 2019-04-22 22:12:12 -06:00
hatmill.go Ran go fmt 2019-04-08 22:10:02 -06:00
README.md Added license and readme 2019-04-17 22:32:53 -06:00

hatmill - HTML generation DSL for Go

License Gitlab pipeline status Go Report Card GoDoc Badge count

Installation

There are three necessary packages:

  • gitlab.codemonkeysoftware.net/b/hatmill
  • gitlab.codemonkeysoftware.net/b/hatmill/attribute
  • gitlab.codemonkeysoftware.net/b/hatmill/element

Install them as you would any other Go package, with go get or whatever. gitlab.codemonkeysoftware.net/b/hatmill is a Go module and so will play nicely with Go ≥ 1.11.

Usage

Basic types are in gitlab.codemonkeysoftware.net/b/hatmill. The attribute and element subpackages contain helper functions for HTML5 attributes and elements. See the Example function in hatmill_test.go.

Hacking

If there is a missing attribute or element helper function, describe it in defs.json and run go generate in the repository root. If you can't figure out what you need to know by reading defs.json, internal/codegen/*, attribute/*, and element/*, then pester me to improve the documentation.