go-binary

command module
v0.0.0-...-da73078 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2020 License: MIT Imports: 12 Imported by: 0

README

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.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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