html2go

command module
v0.0.0-...-7291cdf Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: MIT Imports: 4 Imported by: 0

README

Generate html to htmlgo code

Install

$ go get github.com/sunfmin/html2go

Run

$ html2go # enter and then copy paste html code
<nav class="navbar navbar-expand-lg navbar-light bg-light">
  <input readonly required disabled checked tabindex="-1">
  <input readonly="false">
</nav>
# enter a new line here

Then ctrl+d, the terminal will show:

package hello

var n = Body(
	Nav(
		Input("").Readonly(true).
			Required(true).
			Disabled(true).
			Checked(true).
			TabIndex(-1),
		Input("").Readonly(true),
	).Class("navbar navbar-expand-lg navbar-light bg-light"),
)

Use -pkg if you need to generate a different package prefix

$ html2go -pkg=h

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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