Skip to content

monochromegane/go-bincode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-bincode Build Status

A tool for embedding Go code in a Go binary using go-bindata.

go-bincode

Usage

  1. Install go-bindata and go-bincode.
  2. 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

  1. Fork it
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the master branch
  5. Run test suite with the go generate && go test ./... command and confirm that it passes
  6. Run gofmt -s
  7. Create new Pull Request

License

MIT

Author

monochromegane

About

A tool for embedding Go code in a Go binary using go-bindata.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages