Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jimmysawczuk/go-binary
Takes data from os.Stdin and transforms it into a Go source code file suitable for including in your project.
https://github.com/jimmysawczuk/go-binary
build-tool golang
Last synced: about 4 hours ago
JSON representation
Takes data from os.Stdin and transforms it into a Go source code file suitable for including in your project.
- Host: GitHub
- URL: https://github.com/jimmysawczuk/go-binary
- Owner: jimmysawczuk
- License: mit
- Created: 2014-02-12T22:35:33.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2020-10-27T22:50:22.000Z (about 4 years ago)
- Last Synced: 2025-01-04T03:00:17.737Z (5 days ago)
- Topics: build-tool, golang
- Language: Go
- Homepage:
- Size: 35.2 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-binary
[![Go Report Card](https://goreportcard.com/badge/github.com/jimmysawczuk/go-binary)](https://goreportcard.com/report/github.com/jimmysawczuk/go-binary)Takes data from `os.Stdin` and transforms it into a Go source code file suitable for including in your project.
## Example
```bash
# 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][license].
[license]: https://github.com/jimmysawczuk/go-binary/blob/master/LICENSE