Skip to content

A small utility that converts a binary file into golang byte slice.

Notifications You must be signed in to change notification settings

vonwenm/gobytes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

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,
}

About

A small utility that converts a binary file into golang byte slice.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published