https://github.com/johan-bolmsjo/mkegg
Simple tool to embed arbitrary data into Go executable files
https://github.com/johan-bolmsjo/mkegg
Last synced: 2 months ago
JSON representation
Simple tool to embed arbitrary data into Go executable files
- Host: GitHub
- URL: https://github.com/johan-bolmsjo/mkegg
- Owner: johan-bolmsjo
- License: mit
- Created: 2020-02-01T15:27:22.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-01T15:27:51.000Z (over 5 years ago)
- Last Synced: 2025-03-17T19:09:51.512Z (2 months ago)
- Language: Go
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mkegg
`mkegg` is a really simple tool to embed arbitrary data into Go executable
files. It's to be used together with the `//go:generate` statement in Go source
files.There are similar tools but this one is much simpler and only solves my
immediate needs. There is no registry of assets. Instead an exported function is
provided per asset that returns a `bytes.Reader` interface to read its data.## Installation
go install
## Usage
See `internal/eggs/...` for how to embed data and `mkegg_test.go` for how to
access it. Run `go generate ./...` once `mkegg` has been installed to update
source files with embedded data.