Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A small utility that converts a binary file into golang byte slice.
Go
Branch: master

flags

latest commit d2dc51e427
@h8liu authored
Failed to load latest commit information.
main.go flags
makefile
readme.md gobytes

readme.md

A program that reads a file and outputs its binary representation in golang. This could be useful for embedding binary resource files into a go program.

Usage Example

$ gobytes makefile
package main

var x = []byte{
    0x61, 0x6c, 0x6c, 0x3a, 0x0a, 0x09, 0x67, 0x6f,
    0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c,
    0x20, 0x2e, 0x2f, 0x2e, 0x2e, 0x2e, 0x0a, 0x0a,
    0x66, 0x6d, 0x74, 0x3a, 0x0a, 0x09, 0x67, 0x6f,
    0x20, 0x66, 0x6d, 0x74, 0x20, 0x2e, 0x2f, 0x2e,
    0x2e, 0x2e, 0x0a,
}
Something went wrong with that request. Please try again.