gomdbuilder

package module
v0.0.0-...-798e303 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: BSD-3-Clause Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

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.

Documentation

Index

Constants

View Source
const (
	BR   = "  "
	BRLE = BR + LE
	HLE  = "===" + LE
	HR   = LE + "---" + LE

	LA = ":----"
	RA = "----:"
	CE = ":----:"
)
View Source
const (
	LE = "\n"
)

Variables

This section is empty.

Functions

func B

func B(text ...interface{}) string

func BLi

func BLi(items ...interface{}) string

func Code

func Code(lang string, codes ...interface{}) string

func Doc

func Doc(docs ...string) string

func H

func H(level int, text ...interface{}) string

func H1

func H1(text ...interface{}) string

func H2

func H2(text ...interface{}) string

func H3

func H3(text ...interface{}) string

func H4

func H4(text ...interface{}) string

func H5

func H5(text ...interface{}) string

func H6

func H6(text ...interface{}) string

func I

func I(text ...interface{}) string

func Img

func Img(title string, url string) string

func Ln

func Ln(title string, url string) string

func M

func M(text ...interface{}) string

func NLi

func NLi(items ...interface{}) string

func P

func P(text ...interface{}) string

func Q

func Q(level int, text ...interface{}) string

func Q1

func Q1(text ...interface{}) string

func Q2

func Q2(text ...interface{}) string

func Q3

func Q3(text ...interface{}) string

func Q4

func Q4(text ...interface{}) string

func Q5

func Q5(text ...interface{}) string

func Q6

func Q6(text ...interface{}) string

func T

func T(text ...interface{}) string

func TR

func TR(columns ...interface{}) string

func Table

func Table(rows ...string) string

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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