codegen

command
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 8 Imported by: 0

README

codegen

codegen reads JSON descriptions of HTML elements and attributes, and generates Go functions to create them.

The input file consists of a JSON object like the following, which includes all options for attribute types and element voidnesss:

{
  "elements": [
    {"name": "div"},
    {"name": "img", "void": true},
  ],
  "attributes": [
    {"name": "src", "type": "string"},
    {"name": "disabled", "type": "bool"}
  ]
}

The "void" key can be omitted from an element definition and defaults to false.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL