JinWuZhao / gomdbuilder

A Go based DSL for building markdown

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gomdbuilder

A Go based DSL for building markdown


package main

import (
	"io/ioutil"

	. "github.com/JinWuZhao/gomdbuilder"
)

func main() {
	doc := Doc(H1("Gomdbuilder"),
		P("A Go based DSL for building markdown"), 
		H1("Example"), 
		P("Example: ", Ln("example.go", "example/example.go")),
		P("Result:", Ln("example.md", "example/example.md")),
		)
	ioutil.WriteFile("example.md", []byte(doc), 0666)
}

Example

Source: example.go
Result: example.md

Usage

go get -u github.com/JinWuZhao/gomdbuilder

License

BSD 3-Clause License

Copyright (c) 2018, jinwuzhao All rights reserved.

About

A Go based DSL for building markdown

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Go 100.0%