Skip to content

jimmysawczuk/go-binary

Repository files navigation

go-binary

Go Report Card

Takes data from os.Stdin and transforms it into a Go source code file suitable for including in your project.

Example

# Install go-binary
$ go get github.com/jimmysawczuk/go-binary

# Download some test content from the web
$ curl https://jimmysawczuk.com > index.html

# Pipe the content into go-binary to generate a .go file with our content in it
$ cat index.html | go-binary -f="getData" -out="$GOPATH/src/github.com/jimmysawczuk/go-binary/go-binary-example/get_data.go"

# Install the example, which depends on our file
$ go install github.com/jimmysawczuk/go-binary/go-binary-example

# Run the example, which just prints the content to the screen
$ go-binary-example

# Print the generated .go file to see what it looks like
$ cat $GOPATH/src/github.com/jimmysawczuk/go-binary/go-binary-example/get_data.go

License

go-binary is released under the MIT license.

About

Takes data from os.Stdin and transforms it into a Go source code file suitable for including in your project.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published