Popularity
0.2
Stable
Activity
0.0
Stable
0
1
0
Description
mold your templated to HTML/ TEXT to PDF easily.
Programming language: HTML
License: BSD 3-clause "New" or "Revised" License
Latest version: v0.1
mold alternatives and similar packages
Based on the "Command Line" category.
Alternatively, view mold alternatives based on common mentions on social networks and blogs.
-
urfave/cli
A simple, fast, and fun package for building command line apps in Go -
Rich Interactive Widgets for Terminal UIs
Terminal UI library with rich, interactive widgets — written in Golang -
go-prompt
Building powerful interactive prompts in Go, inspired by python-prompt-toolkit. -
elvish
Elvish = Expressive Programming Language + Versatile Interactive Shell -
tcell
Tcell is an alternate terminal package, similar in some ways to termbox, but better in others. -
cointop
A fast and lightweight interactive terminal based UI application for tracking cryptocurrencies 🚀 -
The Platinum Searcher
A code search tool similar to ack and the_silver_searcher(ag). It supports multi platforms and multi encodings. -
progressbar
A really basic thread-safe progress bar for Golang applications -
pterm
✨ #PTerm is a modern Go module to beautify console output. Featuring charts, progressbars, tables, trees, text input, select menus and much more 🚀 It's completely configurable and 100% cross-platform compatible. -
readline
Readline is a pure go(golang) implementation for GNU-Readline kind library -
pflag
Drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags. -
asciigraph
Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies. -
dotenv-linter
⚡️Lightning-fast linter for .env files. Written in Rust 🦀 -
CLI Color
🎨 Terminal color rendering library, support 8/16 colors, 256 colors, RGB color rendering output, support Print/Sprintf methods, compatible with Windows. GO CLI 控制台颜色渲染工具库,支持16色,256色,RGB色彩渲染输出,使用类似于 Print/Sprintf,兼容并支持 Windows 环境的色彩渲染 -
flaggy
Idiomatic Go input parsing with subcommands, positional values, and flags at any position. No required project or package layout and no external dependencies. -
uitable
A go library to improve readability in terminal apps using tabular data -
termtables
A Go port of the Ruby library terminal-tables for simple ASCII table generation as well as providing markdown and HTML output -
chalk
Intuitive package for prettifying terminal/console output. http://godoc.org/github.com/ttacon/chalk
Less time debugging, more time building
Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.
Promo
scoutapm.com
Do you think we are missing an alternative of mold or a related project?
Popular Comparisons
README
mold
mold your templated to HTML/ TEXT/ PDF easily.
install
go get github.com/mayur-tolexo/mold
Example 1
//Todo model
type Todo struct {
Title string
Done bool
}
//TodoPageData model
type TodoPageData struct {
PageTitle string
Todos []Todo
}
func main() {
tmpl := `
<h1>{{.PageTitle}}<h1>
<ul>
{{range .Todos}}
{{if .Done}}
<li class="done">{{.Title}}</li>
{{else}}
<li>{{.Title}}</li>
{{end}}
{{end}}
</ul>
`
mold, _ := mold.NewHTMLTemplate(tmpl)
data := TodoPageData{
PageTitle: "My TODO list",
Todos: []Todo{
{Title: "Task 1", Done: false},
{Title: "Task 2", Done: true},
{Title: "Task 3", Done: true},
{Title: "Task 4", Done: true},
},
}
if err := mold.Execute(data); err == nil {
mold.PDF(".", "tmp.pdf")
} else {
fmt.Println(err)
}
}
Example 2
//Invoice details
type Invoice struct {
InvoiceNo string
InvoiceDate string
Currency string
AmountDue float64
Items []ItemDetail
Total float64
}
//ItemDetail : Item details
type ItemDetail struct {
Name string
Desc string
Amount float64
Qty int
Total float64
}
func main() {
mold, _ := mold.NewHTMLTemplate()
mold.HTMLPath = "invoice.html"
item := []ItemDetail{
{
Name: "Front End Consultation",
Desc: "Experience Review",
Amount: 150,
Qty: 4,
Total: 600,
},
}
data := Invoice{
InvoiceNo: "Invoice",
InvoiceDate: "January 1, 2019",
Currency: "Rs.",
AmountDue: 600,
Items: item,
Total: 600,
}
if err := mold.Execute(data); err == nil {
mold.PDF(".", "invoice.pdf")
} else {
fmt.Println(err)
}
}