go-bincode
A tool for embedding Go code in a Go binary using go-bindata.
Usage
- Install go-bindata and go-bincode.
- Execute
go-bincode
command at your repository.
$ go-bincode
You can find bincode.go
and bincoder.go
.
So, your Go program get {show,list,restore}-code options.
List code
list-code
list your code.
$ my-app -list-code
app.go
my-app/main.go
Note code-list don't contain bincode.go
and bincoder.go
.
Show code
show-code
show your code.
$ my-app -show-code my-app/main.go
package main
func main() {
my-app.Do()
}
Restore code
restore-code
restore your code.
$ my-app -restore-code
Generated code dependency
Generated code (bincode.go
and bincoder.go
) don't depends on your code, only provides {show,list,restore}-code options at init() function.
Installation
$ go get -u github.com/jteeuwen/go-bindata/... # Requirement
$ go get -u github.com/monochromegane/go-bincode/...
Contribution
- Fork it
- Create a feature branch
- Commit your changes
- Rebase your local changes against the master branch
- Run test suite with the
go generate && go test ./...
command and confirm that it passes
- Run
gofmt -s
- Create new Pull Request
License
MIT
Author
monochromegane