Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 506 Bytes

README.md

File metadata and controls

26 lines (18 loc) · 506 Bytes

file2const

Generates a Go file containing the given files as strings. Useful for packaging in static files.

Usage: file2const <flags> [<inputFile:constantName>] <outputFile.go>
  -package="": name of package to give to file. Default to directory name

Given a file like follows:

console.log("HEY")

This command: file2const --package="example" file.js:value out.go

Will write the following to out.go

package example

const (
	value = "console.log(\"HEY\")\n"
)