Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fallsimply/bilit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bilit

Bilit (pronounced /ˈbilit/) is a bidirectional template library for golang. Inspired by Javascript's Template Literals and Nunjucks

Powered by Regular Expressions

Examples

Simple (map):

func main() {
	const template = "Hello, I'm {{name}} from {{City}}, {{from_state}}"
	var dataSrc = map[string]string{
		"name": "John",
		"City": "Dallas",
		"from_state": "TX"
	}

	var str = bilit.Populate(template, dataSrc) //"Hello, I'm John from Dallas, TX"

	var data = billit.Pull(template, str) //{name: John, City: Dallas, from_state: TX}

}

About

a bidirectional templating engine in golang - pronounced /ˈbilit/

Topics

Resources

License

Stars

Watchers

Forks

Languages