Gom: DOM building using Go

gom

DOM building using Go

Usage

package main

import "github.com/hadihammurabi/gom"

func main() {
	dom := gom.H("html").Children(
		gom.H("head").Children(
			gom.H("title").Children(
				gom.H("Home Page", true),
			),
		),
		gom.H("body").Children(
			gom.H("h1").Children(
				gom.H("Welcome to our Home Page!", true),
			),
		),
	)

	println(dom.Build())
}

it will shows

<html><head><title>Home Page</title></head><body><h1>Welcome to our Home Page!</h1></body></html>

or use DOM utilities

package main

import "github.com/hadihammurabi/gom"

func main() {
        dom := gom.HTML.Children(
                gom.Head.Children(
                        gom.Title.Children(
                                gom.Text("Home Page"),
                        ),
                ),
                gom.Body.Children(
                        gom.H1.Children(
                                gom.Text("Welcome to our Home Page!"),
                        ),
                ),
        )

        println(dom.Build())
}
Owner
Hadi Hidayat Hammurabi
Above Curiousity
Hadi Hidayat Hammurabi
Similar Resources

DOM library for Go and WASM

Go DOM binding (and more) for WebAssembly This library provides a Go API for different Web APIs for WebAssembly target. It's in an active development,

Dec 23, 2022

Go Lang Web Assembly bindings for DOM, HTML etc

WebAPI Go Language Web Assembly bindings for DOM, HTML etc WARNING: The current API is in very early state and should be consider to be expremental. T

Dec 28, 2022

domui: DOM UI framework for Go

domui: DOM UI framework for Go

Jul 23, 2022

hdq - HTML DOM Query Language for Go+

hdq - HTML DOM Query Language for Go+ Summary about hdq hdq is a Go+ package for processing HTML documents. Tutorials Collect links of a html page How

Dec 13, 2022

Dom - A Go API for different Web APIs for WebAssembly target

Go DOM binding (and more) for WebAssembly This library provides a Go API for dif

Jan 7, 2023

package for building REST-style Web Services using Go

go-restful package for building REST-style Web Services using Google Go Code examples using v3 REST asks developers to use HTTP methods explicitly and

Jan 1, 2023

package for building REST-style Web Services using Go

go-restful package for building REST-style Web Services using Google Go Code examples using v3 REST asks developers to use HTTP methods explicitly and

Jan 1, 2023

Scaffold to help building Terraform Providers using AWS IAM authentication.

Terraform Provider Scaffolding This repository is a template for a Terraform provider. It is intended as a starting point for creating Terraform provi

Mar 31, 2022

An e-book on building network applications using golang

Network programming with Go

Dec 7, 2021

A go project generator, which aims to simplify building and releasing go projects by storing all project configuration in a single file called gojen.json, and creates appropriate workflow/git files using that config.

gojen Define your go project's configuration using a json config. This config can be used to generate a new go project for you, and can also create co

Mar 8, 2022

Building microservice to list products of one ecommerce using golang and gRPC

Building microservice to list products of one ecommerce using golang and grpc Command for generate protobuf $ protoc -I ./protos/... file.proto --go_o

Mar 26, 2022

Go-file-downloader-ftctl - A file downloader cli built using golang. Makes use of cobra for building the cli and go concurrent feature to download files.

ftctl This is a file downloader cli written in Golang which uses the concurrent feature of go to download files. The cli is built using cobra. How to

Jan 2, 2022

A boilerplate/starter project for quickly building APIs using Golang with Clean Architechture

A boilerplate/starter project for quickly building APIs using Golang with Clean Architechture

A boilerplate/starter project for quickly building APIs using Golang with Clean Architechture

Mar 2, 2022

CLI - A package for building command line app with go

CLI - A package for building command line app with go

Command line interface Screenshot Key features Lightweight and easy to use. Defines flag by tag, e.g. flag name(short or/and long), description, defau

Dec 23, 2022

Simple and complete API for building command line applications in Go

Simple and complete API for building command line applications in Go Module cli provides a simple, fast and complete API for building command line app

Nov 23, 2022

A Go library for building command line applications

gocmd A Go library for building command line applications. Features Advanced command line arguments handling Subcommand handling Short and long comman

Dec 21, 2022

A versatile library for building CLI applications in Go

mow.cli Package cli provides a framework to build command line applications in Go with most of the burden of arguments parsing and validation placed o

Dec 28, 2022

A simple, fast, and fun package for building command line apps in Go

cli cli is a simple, fast, and fun package for building command line apps in Go. The goal is to enable developers to write fast and distributable comm

Dec 31, 2022
A logr LogSink implementation using Zerolog

Zerologr A logr LogSink implementation using Zerolog. Usage import ( "os" "github.com/go-logr/logr" "github.com/hn8/zerologr" "github

Nov 17, 2022
Easily listen to events from multiple contracts using go-ethereum bindings!

eth-log-aggregator Easily listen to events from multiple contracts using go-ethereum bindings! Usage The usage of this tool is exactly the same as abi

Dec 2, 2022
An example logging system using Prometheus, Loki, and Grafana.
An example logging system using Prometheus, Loki, and Grafana.

Logging Example Structure Collector Export numerical data for Prometheus and log data for Promtail. Exporter uses port 8080 Log files are saved to ./c

Nov 21, 2022
A simple re-creation of the first level for Space Invaders using Go and SDL-2.
A simple re-creation of the first level for Space Invaders using Go and SDL-2.

Space Invaders Go Written in Go using SDL2 Usage This application is a sample first level for a re-creation of Space Invaders. The structure of the pr

Feb 27, 2022
Print build info from binary, using buildinfo package.

Go Build Info Print build info from binary, using buildinfo package. https://pkg.go.dev/debug/[email protected] Note: This was created to help me

Dec 30, 2021
Go-bqstreamer - Stream data into Google BigQuery concurrently using InsertAll()

Kik and me (@oryband) are no longer maintaining this repository. Thanks for all the contributions. You are welcome to fork and continue development. B

Dec 7, 2022
A Golang library to manage your environment variables using structs.

genv A simple Golang library to manage your environment variables using structs. How to use package main import ( "github.com/vdgonc/genv" ) type E

Aug 15, 2022
A logr LogSink implementation using bytes.Buffer

buflogr A logr LogSink implementation using bytes.Buffer. Usage import ( "bytes" "fmt" "github.com/go-logr/logr" "github.com/tonglil/buflogr" )

Jan 6, 2023
Coletor-mpac - Collector of the Public Ministry of Acre (MPAC) using CDP technology

Ministério Público do Acre(MPAC) Esse coletor é baseado na tecnologia Chrome Dev

Jan 28, 2022
Clean architecture starter pack for faster and easier feature creation using Go.
Clean architecture starter pack for faster and easier feature creation using Go.

cleanarchGo ?? About Clean architecture starter pack for faster and easier feature creation using Go. This pack includes Clean Architecture with the E

May 8, 2023