bakego

command module
v0.0.0-...-9cb1e72 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2018 License: Unlicense Imports: 11 Imported by: 0

README

bakego

bakego bakes files into a go file.

Install

Install Go, then

go get github.com/kybin/bakego

Usage Example

bakego created for github.com/kybin/whisky at first. It has template files in tmpl directory like any usual server program.

In this case you can,

$ cd whisky
$ bakego -d tmpl

It will generate gen_bakego.go. The generated code has a global variable named bakego, itself has two methods Extract and Ensure. So you can add code yourself like,

// add init flag to program, then in somewhere of main function

if initFlag {
	bakego.Extract()
} else {
	bakego.Ensure()
}

After go install, whisky -init will create tmpl directory in the run directory.

Documentation

Overview

bakego bakes files' data into a go file.

Jump to

Keyboard shortcuts

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