github.com/wamuir/gohex (go): Command gohex creates static file imports for Go.  Use gohex [file] for embedding static assets in Go like you would for C with xxd -i [file].  This command line tool outputs a Go file containing a byte slice, analogous to a static C array as might generated by hex dumping a file using xxd with the -i (include) flag. An intended use of this tool is to allow for the inclusion of a static file (or multiple static files) within a compiled Go binary.  This is meant to be a straightforward solution for use simple cases: no frills, file systems, compression or configuration. gohex is also quite fast and dumps about 35 percent faster than xxd.  Within a unix shell:  If the output was stored as a .go file, the variable could then be accessed:  Which would yield:  Usage of gohex:  Flags:  Source code is available under an MIT License at https://github.com/wamuir/gohex.
Keywords: encoding|go|hex